发布于 5年前
php 返回当前的毫秒时间戳
代码:
echo microtime()."\r\n";
echo msectime();
function msectime() {
list($msec, $sec) = explode(' ', microtime());
$msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
return $msectime;
}
输出:
0.29730100 1564797743
1564797743297