3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo(array &$foo) { $foo[] = 2; } $a = array(1); call_user_func('foo', $a); var_dump($a); call_user_func('foo', &$a); var_dump($a);
Output for 5.4.0 - 5.4.34
Fatal error: Call-time pass-by-reference has been removed in /in/7Rt1E on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/7Rt1E on line 12 Warning: Parameter 1 to foo() expected to be a reference, value given in /in/7Rt1E on line 9 array(1) { [0]=> int(1) } array(2) { [0]=> int(1) [1]=> int(2) }