<?php
$password = 'nilpointer.net';
$hash = password_hash($password, PASSWORD_BCRYPT);
echo 'password: '.$password;
echo '<br>hash: '.$hash;
$input_password = 'abc';
if(password_verify($input_password, $hash)) {
echo '<br>Password is Valid';
} else {
echo '<br>Invalid Password';
}
?>
Output
password: nilpointer.net
hash: $2y$10$xmL.KUIe2hI0WvKtYhL/Sut0ZVK99KNvnkv/01bU6Dj.01Oq064sa
Invalid Password