I'm testing out the new password hash function from PHP 5.5. (). The $hash and the $password won't match no matter what I do.
$password = "test";
$hash = "$2y$10$fXJEsC0zWAR2tDrmlJgSaecbKyiEOK9GDCRKDReYM8gH2bG2mbO4e";
if (password_verify($password, $hash)) {
echo "Success";
}
else {
echo "Error";
}
Can someone please help me with this?