time php milliseconds code example Example: time now with milliseconds php $d = new DateTime(); echo $d->format("Y-m-d H:i:s.v"); // v : Milliseconds