xxxxxxxxxx
$now = DateTime::createFromFormat('U.u', microtime(true));
echo $now->format("m-d-Y H:i:s.u");
xxxxxxxxxx
<?php
// Get current timestamp in milliseconds
$milliseconds = round(microtime(true) * 1000);
echo $milliseconds;
?>
xxxxxxxxxx
$d = new DateTime();
echo $d->format("Y-m-d H:i:s.v"); // v : Milliseconds