PHP 获取毫秒值时间戳

PHP About 210 words

API

  1. microtime()获取秒,带微秒,字符串形式 '0.98730700 1542263461'
  2. mircotime(true) 获取秒,微秒拼接在小数点,浮点形式 1542263461.9393
  3. intval() 去掉小数点部分
  4. round()保留小数, 比intval更精确
intval(microtime(true) * 1000)
round(microtime(true), 3) * 1000
Views: 3,609 · Posted: 2019-04-08

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh