3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { break; } for ($i = 0; $i < 10; $i++) { print $i . PHP_EOL; if ($i > 3) { foo(); } }
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.5.6
0 1 2 3 4 Fatal error: Cannot break/continue 1 level in /in/LPr4g on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 3PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 4PHP_EOL Fatal error: Cannot break/continue 1 level in /in/LPr4g on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 0PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 1PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 2PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 3PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/LPr4g on line 7 4PHP_EOL Fatal error: Cannot break/continue 1 level in /in/LPr4g on line 3