<?php $func = function () { (yield Promise\all($promise1, $promise2)); }; coroutine($func);
<?php $promise = Promise\all([asyncOperation1(), asyncOperation2()]);