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){  echo " bah ... ";  $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 '" bah ... "' (T_CONSTANT_ENCAPSED_STRING) in u6T28 on line 14
Process exited with code 255.
Output for 5.4.13
Parse error: syntax error, unexpected '" bah ... "' (T_CONSTANT_ENCAPSED_STRING) in /in/G8vK8 on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.22, 5.3.24
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in u6T28 on line 14
Process exited with code 255.
Output for 5.3.23
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/G8vK8 on line 14
Process exited with code 255.

preferences:
177.69 ms | 1395 KiB | 47 Q