Whenever I get this error, I just increased the memory to fix it. I have a case where, for testing purposes, I want the page to use all the memory, but as far as I configured memory_limit.
I do not know how to do that.
EDIT: I tried this:
<?php echo "start"; @ini_set('memory_limit', '1M'); $test = "a"; while (1) { $test = "a" + $test; } echo "done"; ?>
But that did not work. In the end, he simply printed "startstart", which is strange that he was printed twice ...
I need a simple code example, "put a lot of material into memory." Itβs good that I know so much.
php memory overflow
phazei
source share