- password_hash: documentation ( source)
- password_verify: documentation ( source)
<?php
echo "hi";
$hash = '$2y$10$tsxvQurV5.jrREFYEL/f9us9U1obZ1/935ILzOfpPSO4GeOdt7YL2';
if (password_verify('demo', $hash)) {
echo 'Password is valid!';
} else {
echo 'Invalid password.' . password_hash('demo', PASSWORD_BCRYPT);
}
?>