» » memory

 
Sort articles by: Date | Most Rates | Most Views | Comments | Alphabet

Get memory usage by PHP

Author: bamboo06 on 2-11-2014, 03:06, views: 2612

3 Use cPHP built-in function memory_get_usage () to return the PHP script is currently assigned to the amount of memory, in bytes (byte). In the WEB actual development, these functions are useful, we can use it to debug PHP code performance.
Get memory usage by PHP

memory_get_usage () function returns the memory usage, memory_get_peak_usage () function returns the memory usage peaks, getrusage () returns CUP usage. But one thing Please note that you need to run on Linux in these functions.

Category: PHP Scripts