3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "abcdefghijklmnop"; $b = ''; $i = 0; switch (strlen($a) % 8) { case 0: do { $b .= $a[$i++]; case 1: $b .= $a[$i++]; case 2: $b .= $a[$i++]; case 3: $b .= $a[$i++]; case 4: $b .= $a[$i++]; case 5: $b .= $a[$i++]; case 6: $b .= $a[$i++]; case 7: $b .= $a[$i++]; } while ($i < strlen($a)); } var_dump($b);
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected 'case' (T_CASE) in /in/R4OaJ on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CASE in /in/R4OaJ on line 9
Process exited with code 255.