note 44138 added to function.imap-headers
| From: | ceoATl-i-eDOTcom at rn2 dot php dot net | Date: | Thu, 15 Jul 2004 22:10:04 +0000 |
| Subject: | note 44138 added to function.imap-headers | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73335@lists.php.net to get a copy of this message | ||
While I have little doubt that the function works as documented, the test code, as written, is
completely invalid.
You can't just subtract two restults from microtime.
Microtime returns a string with:
".microseconds seconds"
in it.
IE, it begins with a period (.) and then the microseconds, and then a space ( ) and then the
seconds.
You would need something more like:
$start_time = microtime();
;; code to be benchmarked here
$end_time = microtime();
list($start_usec, $start_sec) = explode(' ', $start_time);
list($end_usec, $end_sec) = explode(' ', $end_time);
$delta = ($end_sec + $end_usec) - ($start_sec + $start_usec);
echo "elapsed_time: $delta<BR>\n";
In the original source, the negative numbers indicate that the milliseconds portion of your ending
time is LOWER than the milliseconds portion of the starting time -- Which means that the seconds
portion has "turned over" to the next second -- or possibly several seconds later. It
could even be HOURS later, though I daresay you would have noticed that :-)
----
Manual Page -- http://www.php.net/manual/en/function.imap-headers.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44138
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44138&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44138&report=yes
Search -- http://master.php.net/manage/user-notes.php