title: Get current timestamp with milliseconds
body: <p>I want to get current timestamp with milliseconds in PHP something like below, in JavaScript I use <code>Date.now()</code> </p>
  
  <pre><code>1436030635348
  </code></pre>
  
  <p>I tried something like below:</p>
  
  <pre><code>$time = str_replace(".","",microtime(true)); 
  </code></pre>
  
  <p>But sometime it is not working properly. Like it prints one or two digits less.</p>