real_usage false reports the usage your script used. This will be the more accurate of the two.
real_usage true reports the memory allocated to your script. This will be the higher of the two.
I'd probably use true if I was trying to compare, as your script would never be allocated more than memory limit, and would continue to run as long as it (plus all other scripts) didn't exceed that usage.
not real: 0.73469543457031 MiB
real: 0.75 MiB
not real: 0.75910949707031 MiB
real: 1 MiB
...
not real: 0.95442199707031 MiB
real: 1 MiB
not real: 0.97883605957031 MiB
real: 1 MiB
PHP Fatal error: Allowed memory size of 1048576 bytes exhausted (tried to allocate 793601 bytes) in /home/niko/test.php on line 7
Seems like real usage is the memory allocated from the system - which seems to get allocated in larger buckets than currently needed by the script. (I guess for performance reasons). This is also the memory the php process uses.
The $real_usage = false usage is the memory usage you actually used in your script, not the actual amount of memory allocated by Zend's memory manager.
You should use memory_get_usage(false) because what you want is memory used not memory allocated.
What's the Difference
Your Google Mail might have allocated 25MB of storage for you but it does not mean that is what you have used at the moment.
This is exactly what the PHP doc was saying
Set this to TRUE to get the real size of memory allocated from system. If not set or FALSE only the memory used by emalloc() is reported.
Both arguments would return memory allocated relative to the memory limit but the main difference is:
memory_get_usage(false) give the memory used by emalloc() while memory_get_usage(true) returns milestone which can be demonstration here Memory Mile Store
I want to know how close was the script to hit that limit.
That would take some maths and might only work in loops or specific use cases. Why do I say that?