Php - Find memory usage of php script, Calculate memory usage of php script
Find memory usage of php script
At times you might have a requirement to find how much memory is consumed by your PHP script when the script is executed. You might require this information if your script has a memory leak or takes a long time to execute. If that's the case then you can use the built-in function called memory_get_usage, which will display the exact amount of memory being used by your script. This function is really simple to use and will show you the amount of memory, in bytes, being allocated to the script.
The code
// Displays the amount of memory being used as soon as the script runs echo memory_get_usage() . "/n"; /* ** Your code goes here */ // Displays the amount of memory being used by your code echo memory_get_usage() . "/n"; ?>
The topic on Php - Find memory usage of php script is posted by - Math
Hope you have enjoyed, Php - Find memory usage of php scriptThanks for your time