Doc #60162 [NEW]: Documentation Bug

From: Date: Fri, 28 Oct 2011 19:29:00 +0000
Subject: Doc #60162 [NEW]: Documentation Bug
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7361@lists.php.net to get a copy of this message
From: Operating system: Windows PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Documentation Bug Description: ------------ --- From manual page: http://www.php.net/function.microtime#refsect1-function.microtime-returnvalues --- Hello, on the basis of experimentation I disagree with the wording of the documentation for microtime. I cannot see the documentation whilst I write this but basically the default behaviour is to split the return into the number of seconds since some date in the 1970s and then the other part is described as being the number of microseconds since that time indicated by the whole number of seconds. I see numbers like this... 0.36411000 1319829349 0.42210500 1319829349 In this case the number of seconds is the same but the first part of each time shows a sub-second difference. HOWEVER as I understand it this is NOT the number of microseconds but actually a decimal or float representation of the part that cannot be expressed as whole seconds, the numbers may indicate microseconds in the sense that they offer a certain resolution but the units here are still seconds? I can understand what the definition is attempting to say but it is inaccurate and badly expressed. Several contributors have defined a function which is intended for users who lack the option to give the answer as a float and they simply add the first part to the second part. If the first part was actually expressed in microseconds then it would be necessary to multiply by one million to get the units into seconds before adding to the whole seconds part. If I have mis-understood then the examples given by contributors lack a scaling value of 1 million and should be removed or corrected for clarity. -- Edit bug report at https://bugs.php.net/bug.php?id=60162&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60162&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60162&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60162&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60162&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60162&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60162&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60162&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60162&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60162&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60162&r=support Expected behavior: https://bugs.php.net/fix.php?id=60162&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60162&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60162&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60162&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60162&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60162&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60162&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60162&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60162&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60162&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60162&r=mysqlcfg

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