登录注册

18250178511

php获取当前毫秒时间戳

作者:admin      时间:2018-01-02 14:02:00

php没有自带的函数能获取毫秒时间戳,但提供了一个microtime()函数,如果调用时不带可选参数,本函数以 "msec sec" 的格式返回一个字符串,其中 sec 是自 Unix 纪元(0:00:00 January 1, 1970 GMT)起到现在的秒数,msec 是微秒部分。字符串的两部分都是以秒为单位返回的。

  1. list($msec, $sec) = explode(' ', microtime());
  2. $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);

发表评论

评论列表

匿名

Appreciate it! Plenty of posts. <a href="https://buy4cialis.com/">cialis generic</a> <a href="https://buytrazodone100mg.com/">trazodone</a>

2020-01-11 18:59:08

匿名

Nicely put. Thanks. <a href="https://canadianpharmacyntv.com/">canada drugs online</a>

2020-01-11 18:46:45

匿名

Terrific stuff. Cheers! <a href="https://canadianpharmaceuticalsonlinerx.com/">northwest pharmacy</a>

2020-01-11 17:35:34

匿名

Whoa quite a lot of fantastic tips. <a href="https://kamagra-cheapest.com/">kamagra 100</a> <a href="https://viaonlinebuyntx.com/">canadian pharmacy online</a> <a href="https://drug-prednisone.com/">prednisone 10mg</a> <a href="https://pharmacy-cipro.com/">Ciprofloxacin 500mg Blu Pharmaceuticals</a>

2020-01-11 16:26:48

匿名

Incredible a lot of very good tips! <a href="https://canadianonlinepharmacytrust.com/">canadian pharmacies online</a>

2020-01-11 15:50:23