Home  >  Article  >  Backend Development  >  如何产生这么一组数据

如何产生这么一组数据

WBOY
WBOYOriginal
2016-06-13 11:10:40765browse

怎么产生这么一组数据
看到别人产生一组随机数一样的,时间不一样产生的就不一样,不知道要怎么实现:

2258083390017B
2258083580030B
225808437601E0
22580844800166

时间很近的两组:

2258086181028E
225808618102B5

有没有朋友知道这是什么数据,谢谢了。


------解决方案--------------------
分成两部分 
 前面部分是时间戳 
 后面部分是随机的字符

不知道满足楼主的需求不?
------解决方案--------------------
时间戳也可以增大啊。
------解决方案--------------------
本帖最后由 xuzuning 于 2012-12-07 15:04:03 编辑 2258086181028E
前面 10 个数字为时间戳加某个定值
后面 4 个字符为毫秒数的十六进制表示
基本是这个形式
$k = 887654321;<br />$t = explode(' ', microtime());<br />printf('%u%04X', $t[1]+$k, $t[0]*1000);<br />

------解决方案--------------------
引用:
本帖最后由 xuzuning 于 2012-12-07 15:04:03 编辑
            2258086181028E
前面 10 个数字为时间戳加某个定值
后面 4 个字符为毫秒数的十六进制表示
基本是这个形式PHP code?123$k = 887654321;$t = explode(' ', microtime());printf('%……

版主辛苦了
Statement:
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