3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { } for ($i = 350001; $i < 550001; $i += 10000) { print "\r" . $i; foo(...array_fill(0, $i, "")); }

Abusive script

This script was stopped while abusing our resources

Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.1, 8.1.28 - 8.1.29, 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
350001 360001 370001 380001 390001 400001 410001 420001 430001 440001 450001 460001 470001 480001 490001 500001 510001 520001 530001 540001
Output for 8.1.2 - 8.1.27
350001 360001 370001 380001 390001 400001 410001 420001 430001 440001 450001 460001 470001 480001 490001 500001 510001 520001 530001 Fatal error: Out of memory (allocated 2097152) (tried to allocate 33554440 bytes) in /in/434gU on line 9 mmap() failed: [12] Cannot allocate memory mmap() failed: [12] Cannot allocate memory
Process exited with code 255.

preferences:
79.72 ms | 1114 KiB | 4 Q