execute(); /* send to stdin */ $process->write("abc\n"); echo yield $process->getStdout(); $code = yield $promise; echo "Process exited with {$code}.\n"; });