3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x=5; $y=10; function myTest () { global $x, $y; $y = $x + $y; } myTest(); echo $y; //output 15 ?>
based on j789S
Output for 5.3.19 - 7.2.0
15