PHP code example of f3ath / forkrunner
1. Go to this page and download the library: Download f3ath/forkrunner 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/ */
f3ath / forkrunner example snippets
$func = function ($n) {
return $n * $n;
};
$runner = new \F3\ForkRunner\ForkRunner();
$args = [[3], [4], [5]];
$result = $runner->run($func, $args); // [9, 16, 25]