3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('memory_limit', '64M'); define('N', 100); register_shutdown_function(function() { global $max; ini_set('memory_limit', '256M'); $y = []; for ($i = 0; $i < N; $i++) { var_dump($i); $y[] = str_repeat('asdf', $max); } var_dump('end'); }); $x = array_fill(0, N, ''); $max = 0; $i = 0; while (true) { $x[$i] .= 'asdf'; if (++$i >= N) { $i = 0; $max++; } }

Abusive script

This script was stopped while abusing our resources


preferences:
26.94 ms | 409 KiB | 5 Q