My application currently uses about 7 MB of memory.
It seems that the array uses 700K if I check its size with strlen(serialize($array)))) .
If you use this array in my application and check the memory usage (using memory_get_peak_usage() ), I get 14 MB.
If I do not use it, I get 7 MB.
If this array takes 700 KB serialized, why does PHP need 7 MB for this variable? Or am I doing a benchmark incorrectly?
arrays php memory
ellabeauty
source share