3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function sf($arg) { echo "called\n"; return $arg; } function test() { global ${sf("a")}; var_dump($a); } $a = 42; test();
Output for 5.3.20 - 5.6.28, 7.1.0 - 7.2.6
called int(42)
Output for 7.0.0 - 7.0.20
called called int(42)