1 2 3 4 5 6 7 8 9 10 11 12
<?phpini_set('memory_limit', '5M');$step = 100;$max = 10000000;$bigStr = '';$appendStr = str_repeat('x', $step);for($i = 0; $i < $max; $i += $step) { $bigStr .= $appendStr;}