3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function increment(&$var) { echo 'Variable with value '.$var.' has been passed.'.PHP_EOL; $var++; } $a = 1; call_user_func_array('increment', [$a]); echo $a."\n";
based on oseSF
Output for hhvm-3.15.4, 7.1.0 - 7.3.0rc3
Warning: Parameter 1 to increment() expected to be a reference, value given in /in/erHl3 on line 10 Variable with value 1 has been passed. 1
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
Warning: Parameter 1 to increment() expected to be a reference, value given in /in/erHl3 on line 10 1