The
password_hash
function supports passing in a constant as its second argument to dictate which algo is used. The default value for this constant is
PASSWORD_DEFAULT
and the default value for that is (and I believe will remain to be)
PASSWORD_BCRYPT
.
https://wiki.php.net/rfc/argon2_password_hash
The above link seems to suggest that they were considering changing the default in PHP
7.4 but have since decided against it. Personally, I wonder whether they'd delay making it the default until PHP 8.0.
https://framework.zend.com/blog/2017-08-17-php72-argon2-hash-password.html
This link suggests that far from being standard, you actually need to compile PHP to specifically support it and install the necessary libraries.
Still a valid suggestion I just wanted to point out that it’s not something super simple that everyone will have by default in 7.2. Will definitely be worth keeping an eye out for though.