3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test() { $foo = "local variable"; echo '$foo in global scope: ' . $GLOBALS["foo"] . "\n"; echo '$foo in current scope: ' . $foo . "\n"; } $foo = "Example content"; test(); ?>
Output for 4.3.0 - 7.1.0
$foo in global scope: Example content $foo in current scope: local variable