How to use variable into password_hash second argument
I’m trying to encrypt a password using passowrd_hash() by passing in the hash method as a string:
$password = '121Dating site fоr sеx with girls in Саnadа: https://v.ht/U6n2m';
$hash_method = 'PASSWORD_BCRYPT';
$password_encrypted = password_hash($password, $hash_method);
However, this results in a warning:
Warning: password_hash() expects parameter 2 to be an integer, string given
How can I pass a string value to password_hash()?