PHPackages                             force/arr - 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. force/arr

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

force/arr
=========

Arrays Component contains methods that can be useful when working with arrays.

v3.0.1(5y ago)154.1k↓32.6%MITPHPPHP &gt;=7.2.0

Since Oct 27Pushed 5y ago2 watchersCompare

[ Source](https://github.com/force-components/Arr)[ Packagist](https://packagist.org/packages/force/arr)[ RSS](/packages/force-arr/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (15)Used By (0)

Arrays Component
================

[](#arrays-component)

[![Version](https://camo.githubusercontent.com/5bf4708d2b3f95c4459b28eaa3726bc27fbb92badf9c3c410aa933ef1c0f7306/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f666c6578747970652d636f6d706f6e656e74732f6172726179732e7376673f6c6162656c3d76657273696f6e26636f6c6f723d677265656e)](https://github.com/flextype-components/arrays/releases) [![License](https://camo.githubusercontent.com/0cb650cae5fbc5287da2a5e73501fac11b3fd01c715f9b8045ac852e1246e241/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f636f6c6f723d677265656e)](https://github.com/flextype-components/arrays) [![Total downloads](https://camo.githubusercontent.com/5343b86fbc2910779c4cd8a85a99eadece9a9281e3ac7b1688bb0978125e453f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f666c6578747970652d636f6d706f6e656e74732f6172726179732f746f74616c2e7376673f636f6c6f723d677265656e)](https://github.com/flextype-components/arrays) [![Quality Score](https://camo.githubusercontent.com/425e8d0c28b101d76c15f49b0b0b57ad733d72649b67d242a5f494920d105f82/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f666c6578747970652d636f6d706f6e656e74732f6172726179732e7376673f6272616e63683d6d617374657226636f6c6f723d677265656e)](https://scrutinizer-ci.com/g/flextype-components/arrays?branch=master)

### Installation

[](#installation)

With [Composer](https://getcomposer.org):

```
composer require flextype-components/arrays

```

### Usage

[](#usage)

```
use Flextype\Component\Arrays;
```

### Methods

[](#methods)

MethodDescription[`Arrays::set()`](#array_set)Set an array item to a given value using "dot" notation. If no key is given to the method, the entire array will be replaced.[`Arrays::get()`](#array_get)Returns value from array using "dot notation". If the key does not exist in the array, the default value will be returned instead.[`Arrays::delete()`](#array_delete)Deletes an array value using "dot notation".[`Arrays::has()`](#array_has)Checks if the given dot-notated key exists in the array.[`Arrays::dot()`](#array_dot)Flatten a multi-dimensional associative array with dots.[`Arrays::undot()`](#array_undot)Expands a dot notation array into a full multi-dimensional array.---

####  Method: `Arrays::set()`

[](#-method-arraysset)

Set an array item to a given value using "dot" notation. If no key is given to the method, the entire array will be replaced.

```
Arrays::set($array, 'movies.the-thin-red-line.title', 'The Thin Red Line');
```

####  Method: `Arrays::get()`

[](#-method-arraysget)

Returns value from array using "dot notation". If the key does not exist in the array, the default value will be returned instead.

```
Arrays::get($array, 'movies.the-thin-red-line.title')
```

####  Method: `Arrays::delete()`

[](#-method-arraysdelete)

Deletes an array value using "dot notation".

```
Arrays::delete($array, 'movies.the-thin-red-line');
```

####  Method: `Arrays::has()`

[](#-method-arrayshas)

Checks if the given dot-notated key exists in the array.

```
if (Arrays::has($array, 'movies.the-thin-red-line')) {
    // Do something...
}
```

####  Method: `Arrays::dot()`

[](#-method-arraysdot)

Flatten a multi-dimensional associative array with dots.

```
$array = [
            'movies' => [
                'the_thin_red_line' => [
                    'title' => 'The Thin Red Line',
                    'directed_by' => 'Terrence Malick',
                    'produced_by' => 'Robert Michael, Geisler Grant Hill, John Roberdeau',
                    'decription' => 'Adaptation of James Jones autobiographical 1962 novel, focusing on the conflict at Guadalcanal during the second World War.',
                ],
            ],
         ];

$newArray = Arrays::dot($array);
```

####  Method: `Arrays::undot()`

[](#-method-arraysundot)

Expands a dot notation array into a full multi-dimensional array.

```
$array = [
            'movies.the_thin_red_line.title' => 'The Thin Red Line',
            'movies.the_thin_red_line.directed_by' => 'Terrence Malick',
            'movies.the_thin_red_line.produced_by' => 'Robert Michael, Geisler Grant Hill, John Roberdeau',
            'movies.the_thin_red_line.decription' => 'Adaptation of James Jones autobiographical 1962 novel, focusing on the conflict at Guadalcanal during the second World War.',
         ];

$newArray = Arrays::undot($array);
```

### License

[](#license)

[The MIT License (MIT)](https://github.com/flextype-components/arrays/blob/master/LICENSE.txt)Copyright (c) 2020 [Sergey Romanenko](https://github.com/Awilum)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity66

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

Recently: every ~137 days

Total

13

Last Release

2124d ago

Major Versions

v1.2.8 → v3.0.12020-07-24

PHP version history (3 changes)v1.0.2PHP &gt;=5.3.0

v1.1.0PHP ^7.1.3

v3.0.1PHP &gt;=7.2.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/477114?v=4)[Sergey Romanenko](/maintainers/Awilum)[@Awilum](https://github.com/Awilum)

---

Top Contributors

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

---

Tags

arraycomponentflextypeflextype-componentphpphparraydotarraysphp-arrayflextype-components

### Embed Badge

![Health badge](/badges/force-arr/health.svg)

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

###  Alternatives

[binary-cube/dot-array

PHP Dot-Array :: Sail through array using the dot notation

10107.7k1](/packages/binary-cube-dot-array)[pharaonic/php-dot-array

Access array data quickly/easily using dot-notation and asterisk.

1011.6k3](/packages/pharaonic-php-dot-array)[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)
