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

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

minwork/array
=============

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

v1.13.5(5y ago)63263.9k↓55%13[1 issues](https://github.com/minwork/array/issues)[1 PRs](https://github.com/minwork/array/pulls)5MITPHPPHP &gt;=7.1CI failing

Since Sep 5Pushed 3y ago4 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (34)Used By (5)

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/0a4b79570a1f633afb8d454de48796574c8decf9b56af9aa39eccf4e705cc072/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696e776f726b2f6172726179)](https://packagist.org/packages/minwork/array) [![Github Stars](https://camo.githubusercontent.com/133a1d00c2d0ca9b627c89dcdfdc97aea086ff859d6f74c95fe7d389ca9e316f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d696e776f726b2f61727261793f7374796c653d736f6369616c)](https://github.com/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

43

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity68

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

Recently: every ~42 days

Total

32

Last Release

2074d ago

Major Versions

v0.8.4 → v1.0.02019-02-26

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

arrayarray-helperarray-manipulationsarray-methodsnested-elementsphpphp-libraryphp7helperarrayphp 7arraysobjectsassocmultidimensionalAssociative

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[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)[spatie/array-functions

Some handy array helpers

24864.6k2](/packages/spatie-array-functions)[bocharsky-bw/arrayzy

A native PHP arrays easy manipulation library in OOP way.

38427.0k](/packages/bocharsky-bw-arrayzy)[sarhan/php-flatten

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

21182.2k1](/packages/sarhan-php-flatten)[dotty/dotty

Easy access to array data using dot notation

1293.8k1](/packages/dotty-dotty)

PHPackages © 2026

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