PHPackages                             weew/helpers-array-legacy - 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. weew/helpers-array-legacy

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

weew/helpers-array-legacy
=========================

Useful collection of php array helpers.

v1.4.2(9y ago)112.4k↓50%12MITPHP

Since Jul 21Pushed 9y ago2 watchersCompare

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

READMEChangelogDependencies (2)Versions (16)Used By (2)

Array helpers
=============

[](#array-helpers)

[![Build Status](https://camo.githubusercontent.com/c55c59a4f88cc5288f0a408d321b91c648ae956608c27d354e5c0ec25e5b1c8d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f776565772f68656c706572732d61727261792d6c65676163792e737667)](https://travis-ci.org/weew/helpers-array-legacy)[![Test Coverage](https://camo.githubusercontent.com/e66f5e2a8c1ea42a7020d0a00edbc5a9ab2589b8e3880427c3f216848a6eb60d/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f776565772f68656c706572732d61727261792d6c65676163792e737667)](https://coveralls.io/github/weew/helpers-array-legacy)[![Version](https://camo.githubusercontent.com/08e2c681cb5af79c024c31ac3f972ff6975b2e89cde1fa33fa536ae4d1edddb6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f776565772f68656c706572732d61727261792d6c65676163792e737667)](https://packagist.org/packages/weew/helpers-array-legacy)[![Licence](https://camo.githubusercontent.com/a3e6030053152a6a8a93f3818a885d312377ce8e403eaa14cc87547dea3a6be2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f776565772f68656c706572732d61727261792d6c65676163792e737667)](https://packagist.org/packages/weew/helpers-array-legacy)

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

[](#table-of-contents)

- [Installation](#installation)
- [Introduction](#introduction)
- [Functions](#functions)
    - [array\_get](#array_get)
    - [array\_has](#array_has)
    - [array\_set](#array_set)
    - [array\_remove](#array_remove)
    - [array\_add](#array_add)
    - [array\_take](#array_take)
    - [array\_first](#array_first)
    - [array\_last](#array_last)
    - [array\_reset](#array_reset)
    - [array\_dot](#array_dot)
    - [array\_extend](#array_extend)
    - [array\_extend\_distinct](#array_extend_distinct)
    - [array\_is\_associative](#array_is_associative)
    - [array\_is\_indexed](#array_is_indexed)
    - [array\_contains](#array_contains)

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

[](#installation)

`composer require weew/helpers-array-legacy`

Introduction
------------

[](#introduction)

This tiny library provides various helper functions to deal with arrays. This is a backport of the [weew/array-helpers](https://github.com/weew/helpers-array-legacy) library in order to add support for older PHP versions.

Functions
---------

[](#functions)

#### array\_get

[](#array_get)

Get an item from an array using "dot" notation.

`mixed array_get(array $array, mixed $key [, mixed $default = null])`

#### array\_has

[](#array_has)

Check if an item exists in an array using "dot" notation.

`bool array_has(array $array, mixed $key)`

#### array\_set

[](#array_set)

Set an array item to a given value using "dot" notation.

`array array_set(array &$array, mixed $key, mixed $value)`

#### array\_remove

[](#array_remove)

Remove one or many array items from a given array using "dot" notation.

`void array_remove(array &$array, mixed $keys)`

#### array\_add

[](#array_add)

Add an element to the array at a specific location using the "dot" notation.

`array array_add(array &$array, mixed $key, mixed $value)`

#### array\_take

[](#array_take)

Get an element and remove it from the array using the "dot" notation.

`array array_take(array &$array, mixed $key, [, mixed $default = null])`

#### array\_first

[](#array_first)

Get the first element from an array.

`array array_first(array &$array, [, mixed $default = null])`

#### array\_last

[](#array_last)

Get the last element from an array.

`array array_last(array &$array, [, mixed $default = null])`

#### array\_reset

[](#array_reset)

Reset all numerical indexes of an array (start from zero). Non-numerical indexes will stay untouched.

`array array_reset(array $array [, bool $deep = false])`

#### array\_dot

[](#array_dot)

Flatten a multi-dimensional associative array with dots.

`array array_dot(array $array [, string $prepend = ''])`

#### array\_extend

[](#array_extend)

Extend one array with another.

`array array_extend(array $arrays [, array $...])`

#### array\_extend\_distinct

[](#array_extend_distinct)

Extend one array with another. Non associative arrays will not be merged but rather replaced.

`array array_extend_distinct(array $arrays [, array $...])`

#### array\_is\_associative

[](#array_is_associative)

Check if the given array is associative.

`bool array_is_associative(array $array)`

#### array\_is\_indexed

[](#array_is_indexed)

Check if an array has a numeric index.

`bool array_is_indexed(array $array)`

#### array\_contains

[](#array_contains)

Check if array contains a specific element.

`array array_contains(array $array, mixed $search [, bool $strict = true])`

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~34 days

Total

15

Last Release

3589d ago

Major Versions

v0.0.8 → v1.0.02015-11-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/10b2b854b5829dd13a15967c000ed2119b5faef67aca24d94c653c8ac550d85e?d=identicon)[weew](/maintainers/weew)

---

Top Contributors

[![maximkott](https://avatars.githubusercontent.com/u/2686062?v=4)](https://github.com/maximkott "maximkott (1 commits)")[![mikeSimonson](https://avatars.githubusercontent.com/u/907613?v=4)](https://github.com/mikeSimonson "mikeSimonson (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/weew-helpers-array-legacy/health.svg)

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

###  Alternatives

[magepal/magento2-customeraccountlinksmanager

Customer Account Links Manager for Magento2 allows you to quickly and easily remove unwanted links from customer account dashboard

4084.9k](/packages/magepal-magento2-customeraccountlinksmanager)[nystudio107/craft3-multi-environment

Efficient and flexible multi-environment config for Craft 3 CMS

7218.3k5](/packages/nystudio107-craft3-multi-environment)[bazo/geotools

Geo Tools for PHP 5.4

1373.5k](/packages/bazo-geotools)[tomatophp/filament-helpers

Helper Class Generator to manage your forms and table inside your filament app

127.9k](/packages/tomatophp-filament-helpers)[trilobit-gmbh/contao-headerfootercode-bundle

Contao 4 / Contao 5 header- and footer code bundle

105.5k](/packages/trilobit-gmbh-contao-headerfootercode-bundle)

PHPackages © 2026

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