It's quite logical...

= 0;
$b = 'x';
var_dump(FALSE == $a);
var_dump($a == $b);
var_dump($b == TRUE);

This results in

if you were to follow simple rules learned in elementary school (or just common sense) then seemingly FALSE == TRUE. Opsie.

Of course, the PHP == operator, despite appearances is not an equivalence relation. The above shows exactly that. There is a complex set of rules on how comparisons are done. In our case, when comparing to bools, both values are casted to bool and those values are compared. When comparing a number to a string, the string is converted into a number and then two numbers are compared. These comparisons, as shown can be very different.