3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=5; $y=7; function myTest(){ globle $x,$y; $y= $x+$y; } myTest() //run function echo $y // output the new value for variable $y ?>
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.9
Parse error: syntax error, unexpected '$x' (T_VARIABLE) in /in/ALY60 on line 5
Process exited with code 255.

preferences:
181.95 ms | 1395 KiB | 71 Q