mirror of
https://github.com/danog/parallel-functions.git
synced 2024-12-04 10:38:35 +01:00
9 lines
288 B
PHP
9 lines
288 B
PHP
|
<?php
|
||
|
|
||
|
require __DIR__ . '/../vendor/autoload.php';
|
||
|
|
||
|
use function Amp\ParallelClosure\parallel_map;
|
||
|
use function Amp\Promise\wait;
|
||
|
|
||
|
// We have seen that the order can vary in the previous example, values returned have a deterministic order.
|
||
|
var_dump(wait(parallel_map([1, 2, 3], 'abs')));
|