livestreet / forker
Forker presents a simple interfacing for forking in PHP.
dev-master
2019-07-23 07:39 UTC
This package is auto-updated.
Last update: 2025-02-25 07:52:37 UTC
README
Forker presents a simple interfacing for forking in PHP.
If you need to do several tasks in parallel and collect their results, this is about as simple as it gets.
$things = array($thing1, $thing2);
$results = Forker::map($things, function ($index, $thing) {
// Some expensive operation
return calculateNewThing($thing);
});