PHP's Memory Usage
This is a handy little Snippet that goes well with PHP Microtime. Not only are we concerned with our scripts execution time but we also want to make sure we are not using an exorbitant amount of memory in the process.
At the top of your script lets place the code that will start PHP’s Micro time.
$time_start = microtime(true);
At the bottom of your page, just before the “