Skip to content

Instantly share code, notes, and snippets.

@bosunski
Created July 21, 2020 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bosunski/d099674bfa06d894bd766c52e399da94 to your computer and use it in GitHub Desktop.
Save bosunski/d099674bfa06d894bd766c52e399da94 to your computer and use it in GitHub Desktop.
<?php
use React\ChildProcess\Process;
use React\EventLoop\Factory;
use function React\Promise\Stream\buffer;
require "vendor/autoload.php";
$proc = new Process("composer");
$proc->start($loop = Factory::create());
buffer($proc->stdout)->then(function ($bufferedOutput) {
echo $bufferedOutput;
});
$loop->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment