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'; $env = array('some_option' => 'aeiou'); $process = proc_open('/bin/ls', $descriptorspec, $pipes, $cwd); var_dump($process); echo stream_get_contents($pipes[1]);
Output for 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
resource(7) of type (process)
Output for 5.0.0 - 5.2.2, hhvm-3.10.0 - 3.12.0
resource(4) of type (process)
Output for 4.4.5 - 4.4.9
Warning: proc_open() expects exactly 3 parameters, 4 given in /in/BQa5N on line 11 bool(false) Fatal error: Call to undefined function: stream_get_contents() in /in/BQa5N on line 13
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Warning: proc_open() expects exactly 3 parameters, 4 given in /in/BQa5N on line 11 bool(false) Fatal error: Call to undefined function: stream_get_contents() in /in/BQa5N on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: proc_open() expects exactly 3 parameters, 4 given in /in/BQa5N on line 11 bool(false) Fatal error: Call to undefined function: stream_get_contents() in /in/BQa5N on line 13