1. Go to this page and download the library: Download infrajs/each 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/ */
infrajs / each example snippets
$counter = 0;
$el = [2, [4, 6], 5];
Each::exec($el, function ($b) use (&$counter) {
$counter++;
if ($counter === 3) {
assert(6 === $b);
}
});