Argon2¶
Argon2 is a modern, secure, and highly efficient password hashing algorithm. It was the winner of the Password Hashing Competition (PHC) in 2015 and is designed to resist brute-force attacks, including GPU-based attacks. PHP has built-in support for Argon2 starting from version 7.2.
<?php
$password = "PHP is alive and kicking!";
// Hash the password with Argon2id
print password_hash($password, PASSWORD_ARGON2ID);
?>