PHP code example of eden / array

1. Go to this page and download the library: Download eden/array 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/ */

    

eden / array example snippets


array_keys(array_reverse(array_flip(array(4, 5, 6)))); // [6, 5, 4]

echo eden('array')->set(4, 5, 6)->flip()->reverse()->keys(); //--> [6, 5, 4]

echo eden('array')
	->set(4, 5, 6)
	->flip()
	->reverse()
	->keys(); //--> [6, 5, 4]

//instantiate
$array = eden('array')->set(1, 2, 3);

//push in a new value
$array[] = 4;
 
echo $array[1];  //--> 2
 
foreach($array as $key => $value) {} //loop through array