I have a tiny code like this:
<?php
$memo_start = memory_get_usage(true);
// I do somthing here
$memo_end = memory_get_usage(true);
// calculate memory used
$memo_used = $memo_start - $memo_end;
?>
As of manual from php.net, it returns the amount of memory, in bytes, that's currently being allocated to your PHP script. However, at the beginning of my project, it shows 128 kb, now it shows 768 kb, with nothing changed from server's config. So, my question is: is this PHP function returns the amount of memory for whole PHP scripts on server or just a script standalone (this script) ?
Thank you.