3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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.14
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.24
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.