1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?php use Spiral\Goridge; use Spiral\RoadRunner; /** * echo client over pipes. */ ini_set('display_errors', 'stderr'); require "vendor/autoload.php"; $rr = new RoadRunner\Worker(new Goridge\StreamRelay(STDIN, STDOUT)); while ($in = $rr->receive($ctx)) { $rr->error((string)$in); }