3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = range(1, 10**100); foreach($i as $v){ echo $v . PHP_EOL; }
Output for 8.3.0 - 8.3.6
Fatal error: Uncaught ValueError: The supplied range exceeds the maximum array size: start=1.0 end=10000000000000002101697803323328251387822715387464188032188166609887360023982790799717755191065313280.0 step=1.0 in /in/TmSmL:2 Stack trace: #0 /in/TmSmL(2): range(1, 1.0E+100) #1 {main} thrown in /in/TmSmL on line 2
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=1 end=10000000000000002101697803323328251387822715387464188032188166609887360023982790799717755191065313280 in /in/TmSmL:2 Stack trace: #0 /in/TmSmL(2): range(1, 1.0E+100) #1 {main} thrown in /in/TmSmL on line 2
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=1 end=10000000000000002101697803323328251387822715387464188032188166609887360023982790799717755191065313280 in /in/TmSmL on line 2 Warning: Invalid argument supplied for foreach() in /in/TmSmL on line 3
Output for 5.6.0 - 5.6.40
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/TmSmL on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38
Parse error: syntax error, unexpected '*' in /in/TmSmL on line 2
Process exited with code 255.

preferences:
281.98 ms | 402 KiB | 376 Q