3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function retVal() { return $GLOBALS['foo']; } function & retRef() { return $GLOBALS['foo']; } $foo = 'init'; $bar = retRef(); $bar = 'bar'; var_dump($foo, $bar);
Output for 4.3.0 - 7.2.0
string(4) "init" string(3) "bar"