php 获取时间戳毫秒

/*
 * microsecond 微秒     millisecond 毫秒
 *返回时间戳的毫秒数部分
 */
function get_millisecond()
{
    list($msec, $sec) = explode(' ', microtime());
    $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
    return $msectime;
}

猜你喜欢

转载自blog.csdn.net/qq_30202073/article/details/83537398