3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Arrange $object = new SplFixedArray(2); $object[0] = 'first-value'; $object[1] = 'second-value'; // Act foreach ($object as $key1 => $val1) { foreach ($object as $key2 => $val2) { break; } } // Assert // Will never execute... assert(TRUE === FALSE); // Zjistěte proč v článku na pehapkari.cz: https://github.com/pehapkari/pehapkari.cz/pull/285 // Step into explanation at GitHub: https://github.com/pehapkari/pehapkari.cz/pull/285/files#diff-7677a91736a5051440021053d8fa6962R9

Abusive script

This script was stopped while abusing our resources

Output for 8.1.23 - 8.1.29, 8.2.10 - 8.2.23, 8.3.0 - 8.3.11
Fatal error: Uncaught AssertionError: assert(TRUE === FALSE) in /in/LDQ6i:17 Stack trace: #0 /in/LDQ6i(17): assert(false, 'assert(TRUE ===...') #1 {main} thrown in /in/LDQ6i on line 17
Process exited with code 255.
Output for 7.0.24 - 7.0.30, 7.1.10 - 7.1.28, 7.2.4 - 7.2.29, 7.3.4 - 7.3.16, 7.4.3 - 7.4.4

Process exited with code 137.

preferences:
46.76 ms | 408 KiB | 5 Q