Write this function on top of your PHP script or in any other file and include that in the page where you want to measure the speed issue,
After that call this function after execution of your function and methods, this will return the execution time. and then you check performance of your code.
<?php speedcheck(); /*Initialize the function */ ....Code........ /*-----Your Code---*/ echo speedcheck(); /* Some more code */ echo speedcheck(); /* Yet more code */ echo speedcheck(); ?>
Thats it, now you will compare the performance time and analyse your code accordingly.
Thanks & Enjoy the PHP Coding.