schau dir das mal an
<?php
$hashedpassword = crypt("james");
/*echo $hashedpassword;
*/
if (password_verify('james', $hashedpassword)) {
echo 'Password is valid!';
} else {
echo 'Invalid password.';
}
?>