Are there any potential pitfalls to be aware of when working with password_hash() and password_verfiy() in PHP?

One potential pitfall to be aware of when working with password_hash() and password_verify() in PHP is that the default algorithm used by password_hash() may change in future PHP versions, potentially causing compatibility issues. To avoid this, it's recommended to explicitly specify the algorithm and cost parameter when using password_hash(). This ensures that the hashing algorithm remains consistent across different PHP versions.

// Specify the algorithm and cost parameter when using password_hash()
$options = [
    'cost' => 12,
    'algorithm' => PASSWORD_DEFAULT
];

$password = 'secret_password';
$hashed_password = password_hash($password, PASSWORD_DEFAULT, $options);