1. Go to this page and download the library: Download bocharsky-bw/arrayzy library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bocharsky-bw / arrayzy example snippets
use Arrayzy\ArrayImitator as A;
$a = new A; // Creates a new instance using namespace alias
php
use Arrayzy\ArrayImitator as A;
$a = A::create(['a', 'b', 'c']);
$a = $a->reverse(); // override instance you operates on, because $a !== $a->reverse()
php
use Arrayzy\ArrayImitator as A;
$a = A::create(['a', 'b', 'c']);
$b = clone $a;
$b->shuffle(); // keeps $a unchanged, because $a !== $b
php
php
$a = new A([1, 2, 3]);
// or
$a = new A([1 => 'a', 2 => 'b', 3 => 'c']);