Doc #65951 [ReO]: msec is not in microseconds as stated in documentation

From: Date: Wed, 23 Oct 2013 16:25:45 +0000
Subject: Doc #65951 [ReO]: msec is not in microseconds as stated in documentation
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10539@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65951&edit=1 ID: 65951 User updated by: tim at possibilogy dot com Reported by: tim at possibilogy dot com Summary: msec is not in microseconds as stated in documentation Status: Re-Opened Type: Documentation Problem Package: Documentation problem Operating System: Mac OSX PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Not only is the value for msec in seconds (floating), but it is not even in microseconds given the number of displayed digits is incompatible with it being in microseconds (should only be 0.nnnnnn with 6 digits of precision not 8). My issue is the wording is awkward and inaccurate. Saying "since sec expressed in seconds" sounds like sec IS EXPRESSED in seconds which is correct, but irrelevant to msec in the existing sentence, which says "msec is the number of microseconds". I am not suggesting the return values change, just that the documentation becomes clearer. Previous Comments: ------------------------------------------------------------------------ [2013-10-23 16:15:34] derick@php.net The value is not in microseconds, it is in seconds. ------------------------------------------------------------------------ [2013-10-23 15:23:23] salathe@php.net "and msec is the number of microseconds that have elapsed since sec expressed in seconds." Note the units that msec is "expressed in". ------------------------------------------------------------------------ [2013-10-23 14:29:55] tim at possibilogy dot com Description: ------------ --- From manual page: http://www.php.net/function.microtime#refsect1-function.microtime-returnvalues --- The documentation stats the msec is in microseconds. THe msec portion of the returned result is actually in floating SECONDS value. If it was in microseconds it would be an integer, not starting with "0.". As the example code shows it is a floating seconds value. Test script: --------------- echo microtime(); Expected result: ---------------- I expect (based on documentation) a result like: 965841 1382538279 Actual result: -------------- I actually get: 0.96584100 1382538279 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65951&edit=1

« previous php.doc.bugs (#10539) next »