3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php$foo = 101; switch (true){ default: less: echo "$foo < 100!"; break; default: more: echo "$foo > 100!"; break; default: same: echo "$foo == 100!"; break; default: if ($foo < 100) { goto less; } elseif ($foo > 100) { goto more; } elseif ($foo == 100) { goto same; } break;}
Output for 5.4.0 - 5.5.15
Parse error: syntax error, unexpected '$foo' (T_VARIABLE) in /in/gvKVI on line 1
Process exited with code 255.
Output for 5.3.0 - 5.3.29
<?php$foo = 101; switch (true){ default: less: echo "$foo < 100!"; break; default: more: echo "$foo > 100!"; break; default: same: echo "$foo == 100!"; break; default: if ($foo < 100) { goto less; } elseif ($foo > 100) { goto more; } elseif ($foo == 100) { goto same; } break;}