--TEST-- proc_open() with output socketpairs --FILE-- $pipe) { if (!is_resource($pipe) || feof($pipe)) { unset($pipes[$i]); continue; } $chunk = @fread($pipe, 8192); if ($chunk === false) { throw new Error("Failed to read: " . (error_get_last()['message'] ?? 'N/A')); } if ($chunk !== '') { echo "PIPE {$i} << {$chunk}\n"; } } } ?> --EXPECT-- bool(true) bool(true) PIPE 1 << hello PIPE 2 << SOME ERROR PIPE 1 << world