PHPackages                             pavelzheltok/arrayanalyzer - 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. pavelzheltok/arrayanalyzer

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

pavelzheltok/arrayanalyzer
==========================

Library for analyzing associative arrays for keys existing

00[1 issues](https://github.com/PavelZheltok/arrayanalyzer/issues)PHPCI failing

Since Jun 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/PavelZheltok/arrayanalyzer)[ Packagist](https://packagist.org/packages/pavelzheltok/arrayanalyzer)[ RSS](/packages/pavelzheltok-arrayanalyzer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Array Analyzer
==============

[](#array-analyzer)

Library for associative arrays analyze

Installation
------------

[](#installation)

`composer require pavelzheltok/arrayanalyzer`

Usage
-----

[](#usage)

Function `findKeysPaths(array $array, string $key)`.

Function returns array with all found keys and their paths. Path is array which items are steps into array. Parameters:

`$array` - array for searching

`$key` - key which should be found

```
include_once 'vendor/autoload.php';
use PZ\ArrayAnalyzer;`
$myArray = [
    'mykey1' => 'value',
    'mykey2' => [
        'mykey' => 'value',
        'mykey1' => 'value3',
    ],
];

$result = ArrayAnalyzer::findKeysPaths($myArray, 'mykey1');
var_dump($result);

```

Output

```
array(2) {
  [0]=>
  array(1) {
    [0]=>
    string(6) "mykey1"
  }
  [1]=>
  array(2) {
    [0]=>
    string(6) "mykey2"
    [1]=>
    string(6) "mykey1"
  }
}

```

Function `findMaxDepth(array $array)`.

Functions calculates max array depth.

```
include_once 'vendor/autoload.php';
use PZ\ArrayAnalyzer;`
$myArray = [
    'mykey1' => 'value',
    'mykey2' => [
        'mykey' => 'value',
        'mykey1' => 'value3',
    ],
];

$result = ArrayAnalyzer::findMaxDepth($myArray);
var_dump($result);

```

Output

```
int(2)

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31162716?v=4)[PavelZheltok](/maintainers/PavelZheltok)[@PavelZheltok](https://github.com/PavelZheltok)

---

Top Contributors

[![pzheltok](https://avatars.githubusercontent.com/u/49675295?v=4)](https://github.com/pzheltok "pzheltok (7 commits)")

### Embed Badge

![Health badge](/badges/pavelzheltok-arrayanalyzer/health.svg)

```
[![Health](https://phpackages.com/badges/pavelzheltok-arrayanalyzer/health.svg)](https://phpackages.com/packages/pavelzheltok-arrayanalyzer)
```

###  Alternatives

[eadesigndev/module-fullbreadcrumbs

Full breadcrumbs for product page

223.9k](/packages/eadesigndev-module-fullbreadcrumbs)

PHPackages © 2026

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