3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function do_stuff() { $args = func_get_args(); foreach ($args as $arg) { $arg += 1; } } $a = 1; $b = 2; $c = 3; $d = 4; print_r(array($a,$b,$c,$d)); do_stuff($a,$b,$c,$d); print_r(array($a,$b,$c,$d));
based on qPfgb
Output for 4.3.0 - 7.2.0
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 )