3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i=0 if ($i == 0) { echo "i equals 0"; } elseif ($i == 1) { echo "i equals 1"; } elseif ($i == 2) { echo "i equals 2"; } switch ($i) { case 0: echo "i equals 0"; break; case 1: echo "i equals 1"; break; case 2: echo "i equals 2"; break; } ?>
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'if' (T_IF) in /in/A9Sop on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_IF in /in/A9Sop on line 3
Process exited with code 255.