Sometimes you need to get not seconds but milliseconds since the UNIX epoch:
function millis() : int {
[$milli, $seconds] = explode(' ', microtime()); // from string(21) "0.67932100 1748377570"
return intval($seconds) * 1000 // intval(0.67932100 * 1000) is 679
+ intval(doubleval($milli) * 1000); // 679 + (1748377570 * 1000) = full milliseconds (1000 ms per one s)
}