3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { $a = func_get_args(); call_user_func('bar', $a[0]); } function bar(&$x) { echo $x; } foo(42);
Output for 7.1.0
Warning: Parameter 1 to bar() expected to be a reference, value given in /in/6RVcB on line 3 42
Output for 5.3.0 - 5.6.25, 7.0.0 - 7.0.14
Warning: Parameter 1 to bar() expected to be a reference, value given in /in/6RVcB on line 3
Output for 4.3.0 - 5.2.17, hhvm-3.10.0 - 3.12.0
42