3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', 100); ob_start(); $i = 0; while($i++ < 5000) { echo str_repeat("lol", 42); } ob_end_clean(); ?>
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: Failed to set memory limit to 100 bytes (Current memory usage is 2097152 bytes) in /in/Df4Lc on line 2
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in /in/Df4Lc on line 6
Output for 5.3.0 - 5.3.29
Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 163841 bytes) in /in/Df4Lc on line 6

preferences:
174.82 ms | 401 KiB | 263 Q