PHPackages                             rkr/recursive-array-accessor - 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. rkr/recursive-array-accessor

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

rkr/recursive-array-accessor
============================

Access recursive arrays through an easy interface

4.0(3y ago)31.7kMITPHP

Since Nov 17Pushed 3y ago3 watchersCompare

[ Source](https://github.com/rkrx/php-recursive-array-access)[ Packagist](https://packagist.org/packages/rkr/recursive-array-accessor)[ RSS](/packages/rkr-recursive-array-accessor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (16)Used By (0)

Recursive array access for PHP5.6+
==================================

[](#recursive-array-access-for-php56)

[![Build Status](https://camo.githubusercontent.com/668e8c17237d66e30bd580d3fef1ae6120e7efa4586b600947abfb1f2d529411/68747470733a2f2f7472617669732d63692e6f72672f726b72782f7068702d7265637572736976652d61727261792d6163636573732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rkrx/php-recursive-array-access)

Access to n-dimensional arrays via a simple interface.

Why, what?
----------

[](#why-what)

Example:

```
// PHP5.4-style array syntax
$array = [];
$data = new ArrayPath\Map($array);
$data->set(['a', 'b', 'c'], 'test'); // equals $data['a']['b']['c'] = 'test';
print_r($data->asArray());

echo $data->getString(['a', 'b', 'd'], 'fallback'); // -> "fallback"
print_r($data->getArray(['a', 'b', 'd'], ['fallback'])); // -> ["fallback"]
```

You can also use strings as a path:

```
$array = [];
$data = new StringPath\Map($array);
$data->set('a.b.c', 'test'); // equals $data['a']['b']['c'] = 'test';
print_r($data->asArray());

echo $data->getString('a.b.d', 'fallback'); // -> "fallback"
print_r($data->getArray('a.b.d', ['fallback'])); // -> ["fallback"]
```

Composer:
---------

[](#composer)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 97.4% 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 ~227 days

Recently: every ~458 days

Total

15

Last Release

1380d ago

Major Versions

1.0.2 → 2.0.02013-11-18

2.0.1 → 3.0.02014-05-12

3.4 → 4.02022-08-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f83d7e57a4bf3f1309680dbfbbf2d022f0ee6dae64a4b3bdfbed1226f2f6bef?d=identicon)[rkr](/maintainers/rkr)

---

Top Contributors

[![rkrx](https://avatars.githubusercontent.com/u/5672982?v=4)](https://github.com/rkrx "rkrx (38 commits)")[![dgro](https://avatars.githubusercontent.com/u/7427431?v=4)](https://github.com/dgro "dgro (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rkr-recursive-array-accessor/health.svg)

```
[![Health](https://phpackages.com/badges/rkr-recursive-array-accessor/health.svg)](https://phpackages.com/packages/rkr-recursive-array-accessor)
```

PHPackages © 2026

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