This question is a duplicate, as mentioned above.
However, I think I should summarize my understanding from different answers and comments:
memory_get_peak_usage(false) returns the exact memory used by the PHP script. Use a script to compare the exact memory consumption in different sections of PHP.memory_get_peak_usage(true) returns the memory allocated from the system in a PHP script, it is always higher because the Zend engine allocates memory in 256 KB blocks. Use to find out the real impact of this PHP script on the system.
Basically, memory_get_peak_usage(true) should be memory_get_peak_usage(false) rounded to the next 256KB .
source share