Home > Backend Development > PHP Tutorial > 怎么生成22位的时间戳

怎么生成22位的时间戳

WBOY
Release: 2016-06-13 13:26:47
Original
1314 people have browsed it

如何生成22位的时间戳?

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->echo number_format(microtime(true),12,'','');
Copy after login


我用这种方法,发现最后的4~6位总在几个数之间变动,不知道为什么?

------解决方案--------------------
为啥要22位的呀?有什么业务需求?
------解决方案--------------------
12位小数的意思,时间在变它怎么会不变啊。
------解决方案--------------------
microtime 的最小分辨率是“微秒”,如果你觉得最后几位连续性太差,就表示的机器比较慢
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template