3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "/tmp/error-output.txt", "a") ); $cwd = '/tmp'; $process = proc_open('/bin/ls', $descriptorspec, $pipes, $cwd); var_dump($process); var_dump(stream_get_contents($pipes[1]));
Output for 5.2.3 - 7.1.0
resource(7) of type (process) string(0) ""
Output for 5.0.0 - 5.2.2
resource(4) of type (process) string(0) ""
Output for 4.4.5 - 4.4.9
Warning: proc_open() expects exactly 3 parameters, 4 given in /in/XBnXf on line 10 bool(false) Fatal error: Call to undefined function: stream_get_contents() in /in/XBnXf on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Warning: proc_open() expects exactly 3 parameters, 4 given in /in/XBnXf on line 10 bool(false) Fatal error: Call to undefined function: stream_get_contents() in /in/XBnXf on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: proc_open() expects exactly 3 parameters, 4 given in /in/XBnXf on line 10 bool(false) Fatal error: Call to undefined function: stream_get_contents() in /in/XBnXf on line 12