mirror of
https://github.com/danog/parallel-functions.git
synced 2024-11-26 20:34:49 +01:00
11 lines
371 B
PHP
11 lines
371 B
PHP
<?php
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use function Amp\ParallelFunctions\parallelMap;
|
|
use function Amp\Promise\wait;
|
|
|
|
// All output in the parallel environment is redirected to STDOUT/STDERR of the parent process automatically.
|
|
// You might notice that the output order varies here when running it multiple times.
|
|
wait(parallelMap([1, 2, 3], 'var_dump'));
|