3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function & do_something(&$arg) { $arg = 'func'; return $arg; } $a = 'init'; $b = do_something($a); $b = 'fin'; var_dump($a, $b); $x = 'init'; $y = & do_something($x); $y = 'fin'; var_dump($x, $y);
Output for 4.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(4) "func" string(3) "fin" string(3) "fin" string(3) "fin"