title: How to compile PHP using –with-password-argon2?
body: <p>I try to use PHP's <code>password_hash()</code> function with the <code>PASSWORD_ARGON2I</code>  algorithm, however, I get the following error message:</p>
  <blockquote>
  <p><b>Warning</b>:  Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I' (this will throw an Error in a future
  version of PHP) in <b>some-file.php</b> on line <b>181</b><br />
  <br />
  <b>Warning</b>:  password_hash() expects parameter 2 to be integer, string given in <b>some-file.php</b> on line <b>192</b><br />
  <br />
  <b>Fatal error</b>:  Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'password' cannot be null
  in some-file.php:232
  Stack trace:
  #0 some-file.php(232): PDOStatement-&gt;execute()
  #1 {main}
  thrown in <b>some-file.php</b> on line <b>232</b><br /></p>
  </blockquote>
  <p>I followed <a href="http://php.net/manual/en/function.password-hash.php" rel="nofollow noreferrer">the official documentation of the function</a> word by word, but I still faced this error.</p>
  <p>Then I made some research and I figured out that <a href="https://stackoverflow.com/questions/47634750/travis-ci-php-7-2-dont-support-argon2i/47678023#comment82341219_47678023">&quot;PHP should be compiled using <code>–with-password-argon2</code>&quot;</a> (<a href="https://wiki.php.net/rfc/argon2_password_hash" rel="nofollow noreferrer">where they refer to this file</a>).</p>
  <p>I have no idea how to do this and I could not find any page which would guide me through the steps or provide me more info.</p>
  <p>The hashing function works perfectly with <code>PASSWORD_DEFAULT</code>, but that is not what I need at the moment.</p>