Java OpenResty Spring Spring Boot MySQL Redis MongoDB PostgreSQL Linux Android Nginx 面试 小程序 Arthas JVM AQS juc Kubernetes Docker 诊断工具


PHP 获取毫秒值时间戳

PHP 大约 210 字

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
阅读 3450 · 发布于 2019-04-08

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb

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

扫描二维码关注我
昵称:
随便看看 换一批