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

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

nzo/array
=========

Pack of advanced array functions specifically tailored for: associative (assoc) array, multidimensional array, array of objects and handling nested array elements

v1.13.3(5y ago)025MITPHPPHP &gt;=7.1

Since Sep 5Pushed 5y agoCompare

[ Source](https://github.com/nayzo/array)[ Packagist](https://packagist.org/packages/nzo/array)[ RSS](/packages/nzo-array/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (33)Used By (0)

Minwork Array
=============

[](#minwork-array)

[![Build Status](https://camo.githubusercontent.com/e98c32cb27c2f579cc8a8472235668692d3ef75f/68747470733a2f2f7472617669732d63692e6f72672f6d696e776f726b2f61727261792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/minwork/array) [![Coverage Status](https://camo.githubusercontent.com/5597efd400c8dc6e11b7e0246ad03de2c5437b2a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d696e776f726b2f61727261792f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/minwork/array?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/8d4c9f33e111bea52ddeb53c915e8d4f32e143b9/68747470733a2f2f706f7365722e707567782e6f72672f6d696e776f726b2f61727261792f762f737461626c65)](https://packagist.org/packages/minwork/array) [![License](https://camo.githubusercontent.com/3dfeab76bf8b4c567a0b23fb7e381dff9f1b2ba9/68747470733a2f2f706f7365722e707567782e6f72672f6d696e776f726b2f61727261792f6c6963656e7365)](https://packagist.org/packages/minwork/array)

Pack of array convenience methods for handling:
-----------------------------------------------

[](#pack-of-array-convenience-methods-for-handling)

- **Nested** arrays
- Arrays of **objects**
- **Associative** arrays
- **Chaining** array transformations

### Easily **create**, **access**, **validate**, **manipulate** and **transform** arrays

[](#easily-create-access-validate-manipulate-and-transform-arrays)

Advanced implementation of well known operations:

- [Get](https://minwork.gitbook.io/array/common-methods/get-getnestedelement)
- [Set](https://minwork.gitbook.io/array/common-methods/set-setnestedelement)
- [Has](https://minwork.gitbook.io/array/common-methods/has)
- [Map](https://minwork.gitbook.io/array/manipulating-array/mapping)
- [Each](https://minwork.gitbook.io/array/traversing-array/iterating)
- [Filter](https://minwork.gitbook.io/array/manipulating-array/filtering)
- [Find](https://minwork.gitbook.io/array/traversing-array/finding)
- [Group](https://minwork.gitbook.io/array/manipulating-array/grouping)
- [Sort](https://minwork.gitbook.io/array/manipulating-array/sorting)
- [Check](https://minwork.gitbook.io/array/validating-array/check)
- [And many more...](https://minwork.gitbook.io/array/)

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

[](#installation)

`composer require minwork/array`

Advantages
----------

[](#advantages)

- Thoroughly **tested**
- Well **documented**
- Leverages PHP 7 syntax and **speed**
- No external dependencies
- Large variety of usages

Example of usage
----------------

[](#example-of-usage)

```
// Set nested array value
$array = Arr::set([], 'key1.key2.key3', 'my_value');
// Which is equivalent to
[
  'key1' => [
    'key2' => [
      'key3' => 'my_value'
    ]
  ]
]

// Get nested array value
Arr::get($array, 'key1.key2') -> ['key3' => 'my_value']

// Check if array has nested element
Arr::has($array, 'key1.key2.key3') -> true

// Map array while accessing it's key
Arr::map($array, function ($key, $value) {
   // Your code here
});

// Find array element
Arr::find($array, function ($element) {
  return Arr::get($element, 'key2.key3') === 'my_value';
}) -> [ 'key2' => [ 'key3' => 'my_value'] ]

// Chain few methods
Arr::obj(['test' => 1, 'foo' => 'bar'])
    ->set('abc', 123)
    ->set('[]', 'auto_index')
    ->remove('foo')
    ->getArray()
->
[
  'test' => 1,
  'abc' => 123,
  'auto_index'
]

// Group objects by the result of calling method 'getSize' on each object
Arr::groupObjects([$cat, $dog, $fish, ...], 'getSize') ->
[
  'medium' => [$cat, $dog, ...],
  'small' => [$fish, ...],
  ...
]
```

Documentation
-------------

[](#documentation)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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 ~26 days

Recently: every ~63 days

Total

30

Last Release

2101d ago

Major Versions

v0.8.4 → v1.0.02019-02-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/43973d4c7b23026540ed9f2670200cbd664d7ae7c55126feb465e62ba7a2a86f?d=identicon)[nayzo](/maintainers/nayzo)

---

Top Contributors

[![minwork](https://avatars.githubusercontent.com/u/20630104?v=4)](https://github.com/minwork "minwork (101 commits)")[![nayzo](https://avatars.githubusercontent.com/u/1272883?v=4)](https://github.com/nayzo "nayzo (4 commits)")

---

Tags

helperarrayphp 7arraysobjectsassocmultidimensionalAssociative

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[minwork/array

Pack of advanced array functions specifically tailored for: associative (assoc) array, multidimensional array, array of objects and handling nested array elements

66268.2k5](/packages/minwork-array)[ilya/belt

A handful of tools for PHP developers.

71020.9k1](/packages/ilya-belt)[lukascivil/treewalker

TreeWalker is a simple and small Library that will help you to work faster with manipulation of structures in PHP

741.1M7](/packages/lukascivil-treewalker)[bocharsky-bw/arrayzy

A native PHP arrays easy manipulation library in OOP way.

38427.7k](/packages/bocharsky-bw-arrayzy)[spatie/array-functions

Some handy array helpers

24866.2k2](/packages/spatie-array-functions)[sarhan/php-flatten

Flattens multidimensional arrays, traversables and vars into one dimensional array.

22185.1k1](/packages/sarhan-php-flatten)

PHPackages © 2026

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