title: PHP Deprecated: Methods with the same name password hash
body: <p>error password hash line 1 class passwordhash</p>
  
  <p>PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; PasswordHash has a deprecated constructor
  how to fix error?
  my database 7.1</p>
  
  <pre><code>class PasswordHash {
  var $itoa64;
  var $iteration_count_log2;
  var $portable_hashes;
  var $random_state;
  var $hash_method; // do not modify directly, use set_hash_method instead.
  
  function PasswordHash($iteration_count_log2 = 9, $portable_hashes = false, $hash_method = null, $full_compat = true)
  {
      $this-&gt;portable_hashes = $portable_hashes;
      $this-&gt;full_compat = $full_compat;
  
      if ($this-&gt;set_hash_method($hash_method)===false){
          return false;
      }
      $this-&gt;itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
      if ($iteration_count_log2 &lt; 4 || $iteration_count_log2 &gt; 31)
          $iteration_count_log2 = 8;
      $this-&gt;iteration_count_log2 = $iteration_count_log2;
      $this-&gt;random_state = microtime();
      if (function_exists('getmypid'))
          $this-&gt;random_state .= getmypid();
  
      return $this;
  }
  </code></pre>