In the following code, I expect the if
condition to be true, but actually the else
condition is true. Can anyone explain the reason behind it?
$a = (float) 0;
$b = 0;
if ($b === $a) {
echo "$a and $b are equal";
}
else{
echo "$a and $b are not equal"; // true
}