santaklouse / php-array-utils
Mix of illuminate/Support/Arr and Kohana's array helpers including chaining.
dev-main
2024-03-28 22:56 UTC
Requires
- php: ^8.0
This package is auto-updated.
Last update: 2026-03-29 01:04:38 UTC
README
Mix of illuminate/Support/Arr and Kohana's array helpers including chaining.
How to use
- Installation
$ composer require santaklouse/php-array-utils:dev-main
- Usage
use ArrayUtils\Arr;
Arr::chain([['id' => 1], ['id' => 2], ['id' => 3])
->except(1)
->pluck('id')
->map(fn ($n) => pow($n, 2))
->value();
// === [1, 9]