"/usr/bin/", "pipes" => array( $out, ), "env" => array( "KEY" => "VALUE", "HELLO" => "WORLD", ) ),function($process, $stat, $signal){ echo "spawn_close_cb\n"; var_dump($process); var_dump($stat); var_dump($signal); uv_close($process,function(){ echo "close"; }); }); uv_read_start($out,function($buffer,$stat) use ($out){ var_dump($out); var_dump($stat); var_dump($buffer); uv_close($out,function(){ }); }); uv_run();