PHP code example of sclable / array-functions
1. Go to this page and download the library: Download sclable/array-functions 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/ */
sclable / array-functions example snippets
echo ArrayWrap::range(0, 10)
->filter(function ($nr) { return $nr < 3; })
->map(function ($nr) { return "Number: $nr\n"; })
->reverse();
// echoes
// Number: 2
// Number: 1
// Number: 0