PHP code example of zobzn / batcher

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

    

zobzn / batcher example snippets




$batcher = new \Zobzn\Batcher(30, function (array $items) {
    var_export($items);
});

for ($i = 0; $i < 100; $i++) {
    $batcher->add($i);
}

$batcher->finish();