3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x=5; // globel scope function myTest() { // using x inside a function is generate an error echo "variable x inside function is: $x"; } myTest(); echo "variable x inside function is: $x"; ?>
Output for 5.6.30, hhvm-3.15.4 - 3.19.2, hhvm-3.21.0 - 3.21.3, 7.0.0 - 7.3.0rc3
Notice: Undefined variable: x in /in/iBMbs on line 6 variable x inside function is: variable x inside function is: 5
Output for hhvm-3.20.2, hhvm-3.22.0
Notice: Undefined variable: x in /in/iBMbs on line -1 variable x inside function is: variable x inside function is: 5