获取当前时间的毫秒时间戳

list($msec, $sec) = explode(' ', microtime());     # 0.85447400 1543975789

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

echo $msectime; #1543975789855

得到的$msectime 即为当前的毫秒时间戳

猜你喜欢

转载自blog.csdn.net/syy_666/article/details/84864230
今日推荐