3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $MyVar = 1; ?> <?php switch($MyVar): ?> <?php case '1': ?> Step One <?php break; ?> <?php case '2': ?> Step Two <?php break; ?> <?php endswitch; ?>
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected ' ', expecting endswitch (T_ENDSWITCH) or case (T_CASE) or default (T_DEFAULT) in /in/QCthg on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_INLINE_HTML, expecting T_ENDSWITCH or T_CASE or T_DEFAULT in /in/QCthg on line 3
Process exited with code 255.