mnlnk/array

0.3.0 2022-09-19 16:02 UTC

This package is auto-updated.

Last update: 2024-12-21 22:53:43 UTC


README

Требования:
  • PHP >= 5.6
Установка:
composer require mnlnk/array
Примеры:
require __DIR__.'/vendor/autoload.php';

use Manuylenko\ArrayHelper\Arr;

$arr = [
    //
];
Arr::set($arr, 'key', 'value1');

Arr::set($arr, 'key2.key3', 'value3');
$value = Arr::get($arr, 'key'))

$value = Arr::get($arr, 'key.key2'))

$value = Arr::get($arr, 'key', 'fallback'))
Arr::has($arr, 'key')
Arr::remove($arr, 'key')
Arr::wrap($arr, 'value')