I was testing tests one day, analyzing how functions influence memory usage, and by chance I called the function ob_get_clean()
.
I noticed that the function call "decreased" the memory size used by php.
With ob_start()
I have previously noticed that memory usage increased, as expected, because it saves the output in a buffer.
Now I do not understand why ob_get_clean()
"wiped" some buffer value, decreasing memory, ob_start()
was not called anywhere in the code.
Here are the results I got:
<?php
echo memory_get_usage(); //122224
?>
<?php
ob_get_clean();
echo memory_get_usage(); //113992
?>
Does anyone know why calling% w / o memory has decreased?
Is there any configuration in php.ini that automatically starts buffering or something like that?