PHPackages                             stellarwp/arrays - 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. stellarwp/arrays

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

stellarwp/arrays
================

A library for array manipulation.

1.3.2(3mo ago)5848.3k↑66.2%[1 PRs](https://github.com/stellarwp/arrays/pulls)4GPL-2.0PHPCI passing

Since Aug 25Pushed 3mo ago5 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (17)Used By (4)

StellarWP Arrays
================

[](#stellarwp-arrays)

[![Tests](https://github.com/stellarwp/arrays/workflows/Tests/badge.svg)](https://github.com/stellarwp/arrays/actions?query=branch%3Amain) [![Static Analysis](https://github.com/stellarwp/arrays/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/stellarwp/arrays/actions/workflows/static-analysis.yml)

A library for array manipulations.

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Notes on examples](#notes-on-examples)
- Array utils
    - [accessible](/docs/classes/StellarWP/Arrays/Arr.md#accessible)
    - [add](/docs/classes/StellarWP/Arrays/Arr.md#add)
    - [add\_prefixed\_keys\_to](/docs/classes/StellarWP/Arrays/Arr.md#add_prefixed_keys_to)
    - [add\_unprefixed\_keys\_to](/docs/classes/StellarWP/Arrays/Arr.md#add_unprefixed_keys_to)
    - [array\_visit\_recursive](/docs/classes/StellarWP/Arrays/Arr.md#array_visit_recursive)
    - [collapse](/docs/classes/StellarWP/Arrays/Arr.md#collapse)
    - [destringify\_keys](/docs/classes/StellarWP/Arrays/Arr.md#destringify_keys)
    - [dot](/docs/classes/StellarWP/Arrays/Arr.md#dot)
    - [escape\_multidimensional\_array](/docs/classes/StellarWP/Arrays/Arr.md#escape_multidimensional_array)
    - [except](/docs/classes/StellarWP/Arrays/Arr.md#except)
    - [exists](/docs/classes/StellarWP/Arrays/Arr.md#exists)
    - [filter\_to\_flat\_scalar\_associative\_array](/docs/classes/StellarWP/Arrays/Arr.md#filter_to_flat_scalar_associative_array)
    - [filter\_prefixed](/docs/classes/StellarWP/Arrays/Arr.md#filter_prefixed)
    - [first](/docs/classes/StellarWP/Arrays/Arr.md#first)
    - [flatten](/docs/classes/StellarWP/Arrays/Arr.md#flatten)
    - [forget](/docs/classes/StellarWP/Arrays/Arr.md#forget)
    - [get](/docs/classes/StellarWP/Arrays/Arr.md#get)
    - [get\_first\_set](/docs/classes/StellarWP/Arrays/Arr.md#get_first_set)
    - [get\_in\_any](/docs/classes/StellarWP/Arrays/Arr.md#get_in_any)
    - [has](/docs/classes/StellarWP/Arrays/Arr.md#has)
    - [insert\_after\_key](/docs/classes/StellarWP/Arrays/Arr.md#insert_after_key)
    - [insert\_before\_key](/docs/classes/StellarWP/Arrays/Arr.md#insert_before_key)
    - [intersect\_key\_recursive](/docs/classes/StellarWP/Arrays/Arr.md#intersect_key_recursive)
    - [is\_assoc](/docs/classes/StellarWP/Arrays/Arr.md#is_assoc)
    - [is\_list](/docs/classes/StellarWP/Arrays/Arr.md#is_list)
    - [join](/docs/classes/StellarWP/Arrays/Arr.md#join)
    - [last](/docs/classes/StellarWP/Arrays/Arr.md#last)
    - [list\_to\_array](/docs/classes/StellarWP/Arrays/Arr.md#list_to_array)
    - [map\_or\_discard](/docs/classes/StellarWP/Arrays/Arr.md#map_or_discard)
    - [merge\_recursive](/docs/classes/StellarWP/Arrays/Arr.md#merge_recursive)
    - [merge\_recursive\_query\_vars](/docs/classes/StellarWP/Arrays/Arr.md#merge_recursive_query_vars)
    - [only](/docs/classes/StellarWP/Arrays/Arr.md#only)
    - [parse\_associative\_array\_alias](/docs/classes/StellarWP/Arrays/Arr.md#parse_associative_array_alias)
    - [prepend](/docs/classes/StellarWP/Arrays/Arr.md#prepend)
    - [pull](/docs/classes/StellarWP/Arrays/Arr.md#pull)
    - [query](/docs/classes/StellarWP/Arrays/Arr.md#query)
    - [random](/docs/classes/StellarWP/Arrays/Arr.md#random)
    - [recursive\_ksort](/docs/classes/StellarWP/Arrays/Arr.md#recursive_ksort)
    - [remove\_numeric\_keys\_recursive](/docs/classes/StellarWP/Arrays/Arr.md#remove_numeric_keys_recursive)
    - [remove\_string\_keys\_recursive](/docs/classes/StellarWP/Arrays/Arr.md#remove_string_keys_recursive)
    - [set](/docs/classes/StellarWP/Arrays/Arr.md#set)
    - [shape\_filter](/docs/classes/StellarWP/Arrays/Arr.md#shape_filter)
    - [shuffle](/docs/classes/StellarWP/Arrays/Arr.md#shuffle)
    - [sort\_by\_priority](/docs/classes/StellarWP/Arrays/Arr.md#sort_by_priority)
    - [sort\_recursive](/docs/classes/StellarWP/Arrays/Arr.md#sort_recursive)
    - [sort\_recursive\_desc](/docs/classes/StellarWP/Arrays/Arr.md#sort_recursive_desc)
    - [stringify\_keys](/docs/classes/StellarWP/Arrays/Arr.md#stringify_keys)
    - [strpos](/docs/classes/StellarWP/Arrays/Arr.md#strpos)
    - [to\_list](/docs/classes/StellarWP/Arrays/Arr.md#to_list)
    - [undot](/docs/classes/StellarWP/Arrays/Arr.md#undot)
    - [usearch](/docs/classes/StellarWP/Arrays/Arr.md#usearch)
    - [where](/docs/classes/StellarWP/Arrays/Arr.md#where)
    - [where\_not\_null](/docs/classes/StellarWP/Arrays/Arr.md#where_not_null)
    - [wrap](/docs/classes/StellarWP/Arrays/Arr.md#wrap)
- [Acknowledgements](#acknowledgements)

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

[](#installation)

It's recommended that you install Arrays as a project dependency via [Composer](https://getcomposer.org/):

```
composer require stellarwp/arrays
```

> We *actually* recommend that this library gets included in your project using [Strauss](https://github.com/BrianHenryIE/strauss).
>
> Luckily, adding Strauss to your `composer.json` is only slightly more complicated than adding a typical dependency, so checkout our [strauss docs](https://github.com/stellarwp/global-docs/blob/main/docs/strauss-setup.md).

Notes on examples
-----------------

[](#notes-on-examples)

Since the recommendation is to use Strauss to prefix this library's namespaces, all examples will be using the `Boomshakalaka` namespace prefix.

Acknowledgements
----------------

[](#acknowledgements)

A number of array methods were ported over from [The Events Calendar](https://theeventscalendar.com) and the [Laravel Framework](https://github.com/laravel/framework).

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity41

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50.9% 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 ~69 days

Recently: every ~105 days

Total

14

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3171496e198834c638911ad3c3220bec77871cdf6557eaa9e2a58d16600a1a1?d=identicon)[bordoni](/maintainers/bordoni)

![](https://www.gravatar.com/avatar/70a2847a265444714b48c64eceb3ca742baa3a56757ce65b18bd7bbbbf910312?d=identicon)[dpanta94](/maintainers/dpanta94)

![](https://www.gravatar.com/avatar/97fd764aa710e8d8263a7e3b3fececdfd736b8aad8055227bf592ddf50ad15ba?d=identicon)[stellarwp](/maintainers/stellarwp)

![](https://www.gravatar.com/avatar/ec4ef25906386b60f5f66b3d03064e3bb700bedc94ee8558918565612c74aef3?d=identicon)[johnhooks](/maintainers/johnhooks)

---

Top Contributors

[![borkweb](https://avatars.githubusercontent.com/u/430385?v=4)](https://github.com/borkweb "borkweb (29 commits)")[![defunctl](https://avatars.githubusercontent.com/u/1066195?v=4)](https://github.com/defunctl "defunctl (17 commits)")[![tarecord](https://avatars.githubusercontent.com/u/6947218?v=4)](https://github.com/tarecord "tarecord (7 commits)")[![estevao90](https://avatars.githubusercontent.com/u/18039589?v=4)](https://github.com/estevao90 "estevao90 (4 commits)")

### Embed Badge

![Health badge](/badges/stellarwp-arrays/health.svg)

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

PHPackages © 2026

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