mirror of
https://github.com/danog/process.git
synced 2024-12-12 00:59:41 +01:00
16 lines
338 B
PHP
16 lines
338 B
PHP
<?php
|
|
|
|
include dirname(__DIR__) . "/vendor/autoload.php";
|
|
|
|
use Amp\ByteStream\Message;
|
|
use Amp\Process\Process;
|
|
|
|
Amp\Loop::run(function () {
|
|
$process = yield Process::start("echo 'Hello, world!'");
|
|
|
|
echo yield new Message($process->getStdout());
|
|
|
|
$code = yield $process->join();
|
|
echo "Process exited with {$code}.\n";
|
|
});
|