3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { } catch (Throwable $t) { var_dump($t); } foreach(range(0, 10000000000000000000000000000000) as $foo){echo sprintf('Bonjour %s', $foo);}
Output for 8.3.0 - 8.3.6
Fatal error: Uncaught ValueError: The supplied range exceeds the maximum array size: start=0.0 end=9999999999999999635896294965248.0 step=1.0 in /in/79VHQ:7 Stack trace: #0 /in/79VHQ(7): range(0, 1.0E+31) #1 {main} thrown in /in/79VHQ on line 7
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught ValueError: The supplied range exceeds the maximum array size: start=0 end=9999999999999999635896294965248 in /in/79VHQ:7 Stack trace: #0 /in/79VHQ(7): range(0, 1.0E+31) #1 {main} thrown in /in/79VHQ on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: range(): The supplied range exceeds the maximum array size: start=0 end=9999999999999999635896294965248 in /in/79VHQ on line 7 Warning: Invalid argument supplied for foreach() in /in/79VHQ on line 7
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.38
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/79VHQ on line 7
Process exited with code 255.

preferences:
253.68 ms | 402 KiB | 325 Q