PHP获取当前毫秒时间戳 李维山 2022-02-22 243 阅读1分钟 封装方法如下: //获取毫秒时间戳 function msectime(){ list($msec, $sec) = explode(' ', microtime()); $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000); return $msectime; }