title: PHP call of undefined function hash_equals()
body: <p>any one can help me out of this problem?
  i'm getting error of  '<code>call of undefined function hash_equals()</code>'
  here is my code:</p>
  
  <pre><code>$username = 'Admin';
  $password = 'sample1Pasword';
  
  $dbh = new PDO('mysql:host=localhost;dbname=test', $USER, $PASSWORD);
  
  $sth = $dbh-&gt;prepare('
    SELECT
      hash
    FROM users
    WHERE
      username = :username
    LIMIT 1
    ');
  
  $sth-&gt;bindParam(':username', $username);
  
  $sth-&gt;execute();
  
  $user = $sth-&gt;fetch(PDO::FETCH_OBJ);
  
  // Hashing the password with its hash as the salt returns the same hash
  if ( hash_equals($user-&gt;hash, crypt($password, $user-&gt;hash)) ) {
    // Ok!
  }else{
    //user not found
  }
  </code></pre>
  
  <p>I dont know what's going on, i just search for this function but it givin me a problem instead.
  sorry for my bad english. Thank you!</p>