You Can’t Take True From False, False Is Less than True 
or, PHP’s new math
Sheer brilliance. Unsarcastically, of course, when referring to the title, “Ghost Equals Ghost, but Poison Is False to Steel,” and content of Adam Parrish’s short post on PHP’s type comparison game and Pokémon’s truth table for some bizarre form of fuzzy logic.
The sarcasm is reserved for situations where a few simple rules designed for convenience produce disastrous user experience when applied concurrently. The Double Equals Loose Comparison Matrix appears, at first glance, to be an arbitrary construct of a language designer’s twisted, sadistic brain.

After a bit of archeological excavation, we find that there may be method behind the madness. At the very least a lesser lunacy is involved, since the type conversion rules below describe the mechanisms at work behind the seemingly chaotic scattering of Trues and Falses above.

But we do not get off quite so easily. PHP would not allow it. Why is False less than True? (Boolean values shouldn’t have a numerical order.) If “array is always greater” when comparing an array to any other type, and “object is always greater” when comparing an object to any other type, what happens when you compare an object to an array? PHP is just a bag of ambiguity.
Sodium Dreams