3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $v1 = 1; $v2 = 2; $v3 = 3; function myFunction() { $GLOBALS['v1'] *= 2; $v2 *= 2; global $v3; $v3 *= 2; } myFunction(); echo "$v1$v2$v3";
based on fXE1U
Output for 5.0.4 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: v2 in /in/5av9M on line 7 226
Output for hhvm-3.12.0
226
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: v2 in /in/5av9M on line 7 226