3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = 5; $y = 10; function myTest() { $y = $x + $y; } myTest(); // run function echo $y; // output the new value for variable $y ?>
based on qZiG5
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: x in /in/dSdVe on line 7 Notice: Undefined variable: y in /in/dSdVe on line 7 10
Output for 5.3.22 - 5.6.28
Notice: Undefined variable: y in /in/dSdVe on line 7 Notice: Undefined variable: x in /in/dSdVe on line 7 10