title: PHP password_verify() and slow equals comparison
body: <p>I've been trying to find information about whether <code>password_verify()</code> uses length-constant time comparison to avoid timing attack.</p>
  
  <p>Now, simple example:</p>
  
  <pre><code>$hash = '$2y$10$HH3906lfby7HOy1N3duQh.Kju.84ct6AcMZm2p/SYZsZSXuYWvvT.';
  
  $startTime = microtime(TRUE);
  password_verify('rasmuslerdorf', $hash);
  $endTime = microtime(TRUE);
  
  $time = $endTime - $startTime;
  </code></pre>
  
  <p>This always produces slightly different output, which, according to <a href="https://crackstation.net/hashing-security.htm">this article</a> (<em>"Why does the hashing code on this page compare the hashes in "length-constant" time?"</em> paragraph), could be used in timing attack to pick up a hash. I think those results look rather a bit random, but they surely not constant.</p>
  
  <p><strong>Question is</strong>, does <code>password_verify()</code> uses length-constant time comparison to avoid timing attack? No info on it in the docs, and due to my shallow experience I cannot interpret function processing time results well.</p>