note 76804 deleted from function.microtime by tularis
| From: | tularis@php.net | Date: | Sun, 22 Jun 2008 12:05:19 +0000 |
| Subject: | note 76804 deleted from function.microtime by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-140665@lists.php.net to get a copy of this message | ||
Note Submitter: blagovest dot buyukliev at dotscript dot com
----
Here is a very short and compact way to determine the execution time of a script in seconds, in just
two lines:
$tm_start = array_sum(explode(' ', microtime()));
...
$secs_total = array_sum(explode(' ', microtime())) - $tm_start;
Very handy for debugging and testing purposes.