3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $bar = "Hello, World"; function foo() global $bar; echo $bar; } foo();
Output for 5.4.0 - 5.4.9
Parse error: syntax error, unexpected 'global' (T_GLOBAL), expecting '{' in sR9EU on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.19
Parse error: syntax error, unexpected T_GLOBAL, expecting '{' in sR9EU on line 4
Process exited with code 255.