PHP – Measure Scripts Execution Time and Page Generation Time - Comment Page: 1

In many cases, it is really useful to know the exact time for how long a PHP script is running or how long will take PHP web page load. On the other hand it is also useful to know that how long a particular script operation or part of page load will take. Following PHP Timing class is very simple to use, only create class and start timing and stop timing. Elapsed time function can be used also (elapsed time is calculated from script start time). Statistics can be displayed in print-functions and the same information without any formatting can also get with get-functions. [inttf_post_ad1] PHP Timing class <?php class Timing { private $break; private...

4 comments on “PHP – Measure Scripts Execution Time and Page Generation Time - Comment Page: 1

    1. Very helpful! Thanks for sharing JR.

      Reply
    2. Thanks for this script. Most of the ones I’ve found around the web arent accurate and showed results with huge time differences. This one rocks :)

      Thanks.

      Reply
      • Hi Bornie,

        Thanks! Nice to hear that you like this script. :)

        Reply
    3. Thanks a lot for this! Works as advertised and is extremely easy to implement and use.

      Cheers,
      R

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close