PHP code example of fast-forward / iterators

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

    

fast-forward / iterators example snippets


use FastForward\Iterator\ChunkedIteratorAggregate;

$data = range(1, 10);
$chunked = new ChunkedIteratorAggregate($data, 3);
foreach ($chunked as $chunk) {
    print_r($chunk);
}


use FastForward\Iterator\ChunkedIteratorAggregate;
use FastForward\Iterator\SlidingWindowIteratorIterator;
// ...