3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array( 0 => array('foo' => '1','bar' => 'A'), 1 => array('foo' => '2','bar' => 'B'), 2 => array('foo' => '3','bar' => 'C')); $foo = array_map('array_shift', &$arr); $bar = array_map('array_shift', &$arr); var_dump($foo,$bar);
Output for 7.0.0 - 7.0.6
Parse error: syntax error, unexpected '&' in /in/0rml5 on line 10
Process exited with code 255.
Output for 5.4.0 - 5.6.21, hhvm-3.9.1 - 3.12.0
Fatal error: Call-time pass-by-reference has been removed in /in/0rml5 on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/0rml5 on line 10 Deprecated: Call-time pass-by-reference has been deprecated in /in/0rml5 on line 11 array(3) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" } array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" }