3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { break(2); } for ($i = 0; $i < 10; $i++) { print $i . PHP_EOL; for ($q = 0; $q < 10; $q++) { if ($q > 3) { foo(); } } }
Output for 4.3.10 - 4.3.11, 4.4.0 - 4.4.9, 5.0.2 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.27, 5.4.0 - 5.4.22, 5.5.0 - 5.5.6
0 Fatal error: Cannot break/continue 2 levels in /in/vIMFt 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/vIMFt on line 7 0PHP_EOL Fatal error: Cannot break/continue 2 levels in /in/vIMFt 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/vIMFt on line 7 0PHP_EOL Fatal error: Cannot break/continue 2 levels in /in/vIMFt on line 3

preferences:
217.99 ms | 1399 KiB | 118 Q