3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "start",PHP_EOL; $i=0; $b=1; $z=2; echo "before loop",PHP_EOL; while (true) { $i++; $b*=2; $z**=$z; echo "inside loop, before cond",PHP_EOL; if ($z>1e300) goto w0; echo "inside loop, after cond",PHP_EOL; } echo "after loop, something went wrong... debugging :)",PHP_EOL; var_dump($i, $b, $z); w0: echo "after loop",PHP_EOL; echo "after default",PHP_EOL;
based on jR7q4
Output for 5.6.7 - 7.1.0
start before loop inside loop, before cond inside loop, after cond inside loop, before cond inside loop, after cond inside loop, before cond after loop after default
Output for 5.4.0 - 5.5.35
Parse error: syntax error, unexpected '*=' (T_MUL_EQUAL) in /in/hBES3 on line 12
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_MUL_EQUAL in /in/hBES3 on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_MUL_EQUAL in /in/hBES3 on line 12
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/hBES3 on line 12
Process exited with code 255.