php 获取毫秒时间戳

 

 

<?php 

//获取毫秒
function msectime() {
    list($msec, $sec) = explode(' ', microtime());
    $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
    return $msectime;
}

$time = msectime();
echo $time;

 

posted @ 2025-11-26 15:40  流浪2024  阅读(7)  评论(0)    收藏  举报