PHPackages                             jelle-s/arraykeycombiner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jelle-s/arraykeycombiner

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jelle-s/arraykeycombiner
========================

Combines arrays by searching for intersections and adding them to the master array. Keys are combined using a delimiter.

1.0.2(9y ago)01301GPL-3.0+PHP

Since Dec 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Jelle-S/arraykeycombiner)[ Packagist](https://packagist.org/packages/jelle-s/arraykeycombiner)[ RSS](/packages/jelle-s-arraykeycombiner/feed)WikiDiscussions develop Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (1)

ArrayKeyCombiner
================

[](#arraykeycombiner)

[![Build Status](https://camo.githubusercontent.com/b615bfb3e0c40c295a5f5318c3664f9bdae4a82ac63ee1ab744635c92309df5c/68747470733a2f2f7472617669732d63692e6f72672f4a656c6c652d532f61727261796b6579636f6d62696e65722e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/Jelle-S/arraykeycombiner) [![Code Climate](https://camo.githubusercontent.com/9d69b489aed2f7360055b082dfeb3685967c66c6e380d672a8022b9222a02e60/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4a656c6c652d532f61727261796b6579636f6d62696e65722f6261646765732f6770612e737667)](https://codeclimate.com/github/Jelle-S/arraykeycombiner) [![Test Coverage](https://camo.githubusercontent.com/b6c709408980e540c5205f34514c3aac7ccbc3d5ec35d027f0ebef0806c6492e/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4a656c6c652d532f61727261796b6579636f6d62696e65722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/Jelle-S/arraykeycombiner/coverage) [![Issue Count](https://camo.githubusercontent.com/b4d23187e891e6d349c4484c3ea9fdedc079916a095fca7ba0acc1337bbd9d72/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4a656c6c652d532f61727261796b6579636f6d62696e65722f6261646765732f69737375655f636f756e742e737667)](https://codeclimate.com/github/Jelle-S/arraykeycombiner)

Combines arrays by searching for intersections and adding them to the master array. Keys are combined using a delimiter.

```
use Jelle_S\Util\Combiner\ArrayKeyCombiner;

// Search this array of arrays for intersections and extract them, using a
// delimiter to combine the keys. Limit the number of iterations to search for
// intersections to 10.000, limit the minimum size of intersections to 3, set
// the key delimiter to a comma.
$arrays = array(
 array(
   'a' => 1,
   'b' => 2,
   'c' => 3,
   'd' => 4,
   'e' => 9,
 ),
 array(
   'a' => 1,
   'b' => 2,
   'c' => 3,
   'e' => 9,
 ),
 array(
   'a' => 1,
   'b' => 42,
   'c' => 3,
   'd' => 4,

 ),
 array(
   'b' => 42,
   'c' => 3,
   'a' => 1,
 ),
 array(
   'z' => 26,
   'e' => 9,
   'a' => 1,
 ),
);
$combiner = new Jelle_S\Util\Combiner\ArrayKeyCombiner($arrays, 3, 10000, ',');
print_r($combiner->combine());
```

Output:

```
Array
(
    [4] => Array
        (
            [a] => 1
            [e] => 9
            [z] => 26
        )

    [0,1] => Array
        (
            [a] => 1
            [b] => 2
            [c] => 3
            [e] => 9
        )

    [2,3] => Array
        (
            [a] => 1
            [c] => 3
            [b] => 42
        )

    [2,0] => Array
        (
            [d] => 4
        )

)

```

The 'a' and 'z' keys of the array with key '4' were not combined because the threshold for combinations is 3, and combining them would result in a combined array with only two elements.

The arrays with keys '2' and '0' **were** combined because after extracting the combinations, these two arrays were identical, and the threshold has no effect for **identical** arrays, they are always combined.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

3

Last Release

3474d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd0af1f056fd3baa2df55c0c745ade4d0f8af99505f717bf0ad48d7b615a2153?d=identicon)[Jelle-S](/maintainers/Jelle-S)

---

Top Contributors

[![Jelle-S](https://avatars.githubusercontent.com/u/1828542?v=4)](https://github.com/Jelle-S "Jelle-S (12 commits)")

### Embed Badge

![Health badge](/badges/jelle-s-arraykeycombiner/health.svg)

```
[![Health](https://phpackages.com/badges/jelle-s-arraykeycombiner/health.svg)](https://phpackages.com/packages/jelle-s-arraykeycombiner)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
