Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP password_verify() Function

PHP password_verify() Function

PHP Password Hashing AlgorithmsPHP 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:

Return Value

Returns TRUE if the password matches the hash, otherwise returns FALSE.

Example

password_verify() Usage

The output is:

Password is valid!

PHP Password Hashing AlgorithmsPHP Password Hashing Algorithm