3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "contando com for... \n"; /* for($fa = 0; $fa < 10; $fa++){  echo "damn"; } //echo "\n\n"; */ echo "contando com while..."; $f = 0; while ($f < 10){ $f++; } echo "\n\n"; $f = floor(rand(0,3)); switch ($f){  case 0: echo "Zero\n"; break;  case 1: echo "Um\n"; break;  case 2: echo "Dois\n"; break;  case 3: echo "Três\n"; break;  default: echo "Nunca deverias ter lido isto :)"; break; } echo "\n\n"; ?>
Output for 5.4.0 - 5.4.12, 5.4.14
Parse error: syntax error, unexpected ' case' (T_STRING), expecting case (T_CASE) or default (T_DEFAULT) or '}' in vlqGl on line 18
Process exited with code 255.
Output for 5.4.13
Parse error: syntax error, unexpected ' case' (T_STRING), expecting case (T_CASE) or default (T_DEFAULT) or '}' in /in/9Go0h on line 18
Process exited with code 255.
Output for 5.3.0 - 5.3.22, 5.3.24
Parse error: syntax error, unexpected T_STRING, expecting T_CASE or T_DEFAULT or '}' in vlqGl on line 18
Process exited with code 255.
Output for 5.3.23
Parse error: syntax error, unexpected T_STRING, expecting T_CASE or T_DEFAULT or '}' in /in/9Go0h on line 18
Process exited with code 255.

preferences:
180.03 ms | 1395 KiB | 47 Q