PHP password_verify() Function
PHP Password Hashing Algorithm
The password_verify() function is used to verify whether the password matches the hash.
PHP version requirement: PHP 5 >= 5.5.0, PHP 7
Syntax
bool password_verify ( string $password , string $hash )
Parameter Description:
- password: the user's password.
- hash: a hash created by password_hash() (the function) creates.
Return Value
Returns TRUE if the password matches the hash, otherwise returns FALSE.
Example
password_verify() Usage
The output is:
Password is valid!