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: 2024-03-25 05:52:06 UTC


README

Build Status

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);
});