|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64959 PHP must have the ability support nanoseconds
Submitted: 2013-06-03 01:44 UTC Modified: 2013-07-24 07:52 UTC
Avg. Score:3.5 ± 1.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: zf at ancientrocklab dot com Assigned:
Status: Wont fix Package: Date/time related
PHP Version: 5.4.15 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: zf at ancientrocklab dot com
New email:
PHP Version: OS:


 [2013-06-03 01:44 UTC] zf at ancientrocklab dot com
PHP must have the ability support nanoseconds.
In today high traffic and high load website. We really need to support 
think about it, in per seconds, their maybe more than 1 million trades, if you 
have not nonoseconds.
how can you know the real time it be?
We can now only using scripts like : 

echo passthru("date +%s.%N");

but this way is not native, so please add support it .
just like support microtime.

You guys may know Java has Nanoseconds function.

Java is ready for bussiness. but what about PHP?

Test script:
NO function can return nanoseconds native.

Expected result:

Actual result:
no way to got it.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-24 07:52 UTC]
-Status: Open +Status: Wont fix
 [2013-07-24 07:52 UTC]
Citation from the page you've linked
"This method provides nanosecond precision, but not necessarily nanosecond resolution 
(that is, how frequently the value changes) - no guarantees are made except that the 
resolution is at least as good as that of currentTimeMillis()."

Java has the exact the same issue as any other, because the cause of it is in the 
hardware/os. You can see many simimlar issues even with microtime resolution. That way 
it'll never handle 1e6 or more deals per second. So let's wait until java is forearmed 
for business, php will follow ;)
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Dec 08 19:03:42 2022 UTC