3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x=5; $y=7; //globle scope function myTest(){ echo $x+$y; } myTest(); ?>
Output for 7.0.0 - 7.3.0rc3
Notice: Undefined variable: x in /in/RfmRC on line 5 Notice: Undefined variable: y in /in/RfmRC on line 5 0
Output for hhvm-3.22.0
Notice: Undefined variable: y in /in/RfmRC on line -1 Notice: Undefined variable: x in /in/RfmRC on line -1 0
Output for 5.6.30, hhvm-3.15.4 - 3.21.3
Notice: Undefined variable: y in /in/RfmRC on line 5 Notice: Undefined variable: x in /in/RfmRC on line 5 0