I am learning php and was trying this php function but for some reason it isn't working despite trying all the answers here. I hashed 'b' using password_hash function and tried to verify it. Here is my code
if(password_verify('b',
'$2y$10$OCZvoaVXX00xBkwpfGfgOu9AGXutvcZkhvpqSVWpL6v.BNnLsAN4u')){
echo "valid";
}else{
echo "invalid";
}