Simple class to fork processes in PHP and allow multi-threading

2.0.1 2016-11-19 06:38 UTC

This package is not auto-updated.

Last update: 2024-05-20 11:10:17 UTC


Simple class to fork processes in PHP and allow multi-threading.

Full documentation is available at http://duncan3dc.github.io/fork-helper/
PHPDoc API documentation is also available at http://duncan3dc.github.io/fork-helper/api/

Build Status Latest Stable Version

Quick Example

Run some code asynchronously:

$fork = new \duncan3dc\Forker\Fork;

$fork->call(function () {
    for ($i = 1; $i <= 3; $i++) {
        echo "Process A - " . $i . "\n";
$fork->call(function () {
    for ($i = 1; $i < 3; $i++) {
        echo "Process B - " . $i . "\n";

echo "Waiting for the threads to finish...\n";
echo "End\n";

Read more at http://duncan3dc.github.io/fork-helper/


A Changelog has been available since version 2.0.0

Where to get help

Found a bug? Got a question? Just not sure how something works?
Please create an issue and I'll do my best to help out.
Alternatively you can catch me on Twitter