PHPackages                             dot-array/dot-array - 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. dot-array/dot-array

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

dot-array/dot-array
===================

(C)oncept-Labs 'DOT' Array

1.0.0.1(1y ago)011MITPHPPHP &gt;=8.0

Since Mar 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dot-array/dot-array)[ Packagist](https://packagist.org/packages/dot-array/dot-array)[ RSS](/packages/dot-array-dot-array/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Exrray
======

[](#exrray)

Exrray is a PHP library that provides a collection of array functions to simplify array manipulation. It includes features such as merging arrays, walking through arrays, and accessing or setting values using dot notation.

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

[](#installation)

You can install Exrray via Composer:

```
composer require dot-array/dot-array
```

Usage
-----

[](#usage)

### Accessing and Setting Values Using Dot Notation

[](#accessing-and-setting-values-using-dot-notation)

You can get and set values in an array using dot notation with the `DotArray` class:

```
use Exrray\DotArray;

$array = ['a' => ['b' => ['c' => 3]]];

// Get a value
$value = DotArray::get($array, 'a.b.c');
echo $value; // Output: 3

// Set a value
DotArray::set($array, 'a.b.d', 4);
print_r($array);
// Output:
// Array
// (
//     [a] => Array
//         (
//             [b] => Array
//                 (
//                     [c] => 3
//                     [d] => 4
//                 )
//         )
// )
```

### Merging Arrays to a Specific Path

[](#merging-arrays-to-a-specific-path)

You can merge arrays to a specific path using the `mergeTo` method:

```
use Exrray\DotArray;

$array1 = ['a' => ['b' => ['c' => 3]]];
$array2 = ['d' => 4];

DotArray::mergeTo('a.b', $array1, $array2);

print_r($array1);
// Output:
// Array
// (
//     [a] => Array
//         (
//             [b] => Array
//                 (
//                     [c] => 3
//                     [d] => 4
//                 )
//         )
// )
```

### Merging Arrays

[](#merging-arrays)

You can merge two arrays using the `merge` method:

```
use Exrray\Exrray;

$array1 = ['a' => 1, 'b' => ['c' => 3]];
$array2 = ['b' => ['d' => 4], 'e' => 5];

$result = Exrray::merge($array1, $array2);

print_r($result);
// Output:
// Array
// (
//     [a] => 1
//     [b] => Array
//         (
//             [c] => 3
//             [d] => 4
//         )
//     [e] => 5
// )
```

### Walking Through Arrays

[](#walking-through-arrays)

You can walk through an array and apply a callback to each value using the `walk` method:

```
use Exrray\Exrray;

$array = [1, 2, [3, 4]];

Exrray::walk($array, function(&$value, $key) {
    $value *= 2;
});

print_r($array);
// Output:
// Array
// (
//     [0] => 2
//     [1] => 4
//     [2] => Array
//         (
//             [0] => 6
//             [1] => 8
//         )
// )
```

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Contributing
------------

[](#contributing)

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Contact
-------

[](#contact)

For any questions or inquiries, please contact the project maintainer.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance45

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

432d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39bcfd110a5cc1f2d7ff687193670d00133cf415ad2b9959afaff24ff1e564fd?d=identicon)[vgalitsky](/maintainers/vgalitsky)

---

Top Contributors

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

---

Tags

phparraydot-access

### Embed Badge

![Health badge](/badges/dot-array-dot-array/health.svg)

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

###  Alternatives

[zakirullin/mess

Convenient array-related routine &amp; better type casting

21228.9k2](/packages/zakirullin-mess)

PHPackages © 2026

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