diff --git a/ext/standard/tests/general_functions/proc_open_multiplex.phpt b/ext/standard/tests/general_functions/proc_open_multiplex.phpt new file mode 100644 index 0000000000000..63e856b29c31e --- /dev/null +++ b/ext/standard/tests/general_functions/proc_open_multiplex.phpt @@ -0,0 +1,51 @@ +--TEST-- +Multiplexing of child output +--FILE-- + 0) { + foreach ($rset as $pipe) { + if ($selected === 10) { + echo "stream_select() reported all pipes as ready\n"; + echo "Read:\n", implode("\n", $out); + exit; + } + $out[] = fread($pipe, 6); + unset($read_pipes[array_search($pipe, $read_pipes)]); + } + $rset = $read_pipes; +} +if ($selected === false) { + echo "stream_select() failed\n"; + echo "Read:\n", implode("\n", $out); + exit; +} +sort($out); +echo "Read:\n", implode("\n", $out); +?> +--EXPECT-- +Read: +hello0 +hello1 +hello2 +hello3 +hello4 +hello5 +hello6 +hello7 +hello8 +hello9