Function unwrap
Waits on all of the provided promises and returns the fulfilled values.
Returns an array that contains the value of each promise (in the same order the promises were provided). An exception is thrown if any of the promises are rejected.
mixed |
$promises |
Iterable of PromiseInterface objects to wait on. |
array
|
array |
Exception
|
on error |
Throwable
|
on error in PHP >=7 |