lovelycesar Posted April 1, 2012 Share Posted April 1, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/260111-question-memory_get_usage/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.