mirror of
https://github.com/danog/parallel-functions.git
synced 2024-12-02 09:37:56 +01:00
10 lines
274 B
PHP
10 lines
274 B
PHP
<?php
|
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
|
|
|
use function Amp\ParallelFunctions\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(map([1, 2, 3], 'abs')));
|