3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <head><title>no_global.php</title></head> <body> <?php> $a = 1; function gtest(){ print ($a+1); } gtest(); ?> </body> </html>
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<html> <head><title>no_global.php</title></head> <body> Notice: Use of undefined constant php - assumed 'php' in /in/A30cT on line 4 Notice: Undefined variable: a in /in/A30cT on line 7 1</body> </html>
Output for 4.3.0 - 5.3.29
<html> <head><title>no_global.php</title></head> <body> <?php> $a = 1; function gtest(){ print ($a+1); } gtest(); ?> </body> </html>