PHP code example of upfor / forkman

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

    

upfor / forkman example snippets




use Upfor\ForkMan\ForkMan;

(function (ForkMan $fm) {
    $fm->submit([1, 1000]);
    $fm->submit([1001, 2000]);

    $fm->wait(3000);
})->slave(function ($params, ForkMan $fm) {
    $fm->log($params);
});