php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60690 microsec/1000
Submitted: 2012-01-09 08:17 UTC Modified: 2012-02-10 18:47 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: radler63 at hotmail dot com Assigned: irker (profile)
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 - 11 = ?
Subscribe to this entry?

 
 [2012-01-09 08:17 UTC] radler63 at hotmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.microtime#refsect1-function.microtime-examples
---
I think you have to divide the ms by 1000



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-09 14:56 UTC] hello at apfelbox dot net
Hi,

no, microtime(true) returns the seconds with the microseconds as float.
For example 1 second, 500 microseconds will return 1.5


The example is therefore correct.
 [2012-02-10 18:47 UTC] irker@php.net
From documentation:
"If get_as_float is set to TRUE, then microtime() returns a FLOAT, which 
represents the current time in SECONDS since the Unix epoch accurate to the 
nearest microsecond."
thx hello at apfelbox dot net
 [2012-02-10 18:47 UTC] irker@php.net
-Status: Open +Status: Not a bug -Package: Online Doc Editor problem +Package: Documentation problem -Assigned To: +Assigned To: irker
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 05:01:30 2024 UTC