3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array('test' => array(1,2,3)); $process = proc_open( 'set', array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w'), ), $pipes, null, $x ); if (is_resource($process)) { fclose($pipes[0]); stream_get_contents($pipes[1]); fclose($pipes[1]); var_dump(proc_close($process)); } print_r($x);
Output for 7.0.14 - 7.1.0
Notice: Array to string conversion in /in/uuk3M on line 12 int(127) Array ( [test] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )
Output for 7.0.9 - 7.0.10
Notice: Array to string conversion in /in/uuk3M on line 12 Warning: proc_open(): fork failed - Resource temporarily unavailable in /in/uuk3M on line 12 Array ( [test] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )
Output for 7.0.0 - 7.0.8
Notice: Array to string conversion in /in/uuk3M on line 12 Notice: Array to string conversion in /in/uuk3M on line 12 Warning: proc_open(): fork failed - Resource temporarily unavailable in /in/uuk3M on line 12 Array ( [test] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )
Output for hhvm-3.10.0 - 3.12.0
int(255) Array ( [test] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )
Output for 5.6.28
Notice: Array to string conversion in /in/uuk3M on line 14 Notice: Array to string conversion in /in/uuk3M on line 14 int(127) Array ( [test] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )
Output for 5.4.27 - 5.4.45, 5.5.11 - 5.6.25
Notice: Array to string conversion in /in/uuk3M on line 14 Notice: Array to string conversion in /in/uuk3M on line 14 Warning: proc_open(): fork failed - Resource temporarily unavailable in /in/uuk3M on line 14 Array ( [test] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )
Output for 5.0.0 - 5.4.26, 5.5.0 - 5.5.10
Notice: Array to string conversion in /in/uuk3M on line 14 Warning: proc_open(): fork failed - Resource temporarily unavailable in /in/uuk3M on line 14 Array ( [test] => Array )
Output for 4.3.0 - 4.4.9
Warning: proc_open() expects exactly 3 parameters, 5 given in /in/uuk3M on line 14 Array ( [test] => Array ( [0] => 1 [1] => 2 [2] => 3 ) )