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


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


$time_start = microtime(true);

// some long running codes...

$time_end = microtime(true);

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

 Leave a Reply



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>