Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Sep 142010
 

Calculate PHP script's execution time

Answer:

If you want to estimate the PHP script's execution time, you can try something like the following:

<?php

$time_start = microtime(true);

// some long running codes...

$time_end = microtime(true);

echo "Time (msec) passed: " , $time_end - $time_start;

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>