note 58479 added to function.microtime
| From: | sybeer dot SuperSpamKiller at wp dot pl | Date: | Sat, 05 Nov 2005 11:25:30 +0000 |
| Subject: | note 58479 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98128@lists.php.net to get a copy of this message | ||
I write two line script generation time code (inspirated by samples above):
<?php
$startTime = array_sum(explode(" ",microtime()));
<<some php code>>
echo round((array_sum(explode(" ",microtime())) - $startTime),4).' sec';
// number four tell how many digits will be print
?>
example code execution reslults
0.4983 sec
<>
----
Manual Page -- http://www.php.net/manual/en/function.microtime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58479
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58479&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58479&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58479&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58479&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58479&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58479&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58479&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58479&report=yes
Search -- http://master.php.net/manage/user-notes.php