note 71581 added to function.microtime
| From: | heavyraptor at osu1 dot php dot net | Date: | Wed, 06 Dec 2006 18:15:41 +0000 |
| Subject: | note 71581 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-120347@lists.php.net to get a copy of this message | ||
Instead of using the complicated function below
<?php
function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
?>
you may use my the fast & sexy function
<?php
function microtime_float() {
return array_sum(explode(' ',microtime()));
}
?>
Returns the exactly same result.
have fun :)
----
Server IP: 194.153.94.10
Probable Submitter: 80.219.154.129
----
Manual Page -- http://www.php.net/manual/en/function.microtime.php
Edit -- https://master.php.net/note/edit/71581
Del: integrated -- https://master.php.net/note/delete/71581/integrated
Del: useless -- https://master.php.net/note/delete/71581/useless
Del: bad code -- https://master.php.net/note/delete/71581/bad+code
Del: spam -- https://master.php.net/note/delete/71581/spam
Del: non-english -- https://master.php.net/note/delete/71581/non-english
Del: in docs -- https://master.php.net/note/delete/71581/in+docs
Del: other reasons-- https://master.php.net/note/delete/71581
Reject -- https://master.php.net/note/reject/71581
Search -- https://master.php.net/manage/user-notes.php