개발/laravel

laravel. 현재시간 milliseconds로 구하기

ttoance 2022. 6. 14. 11:51
$milliseconds = floor(microtime(true) * 1000);

var_dump(microtime());       // string(21) "0.89115400 1283846202"
var_dump(microtime(true));   // float(1283846202.89)
 

How to get current time in milliseconds in PHP?

time() is in seconds - is there one in milliseconds?

stackoverflow.com

 

반응형