Suppose A equals B, and also B equals C. Any reasonable person would expect that A equals C, right?



Oh yeah?

% cat equality.php <?php $a = 0; $b = "eggs"; $c = "spam"; print ($a == $b) ? "a == b

" : "a != b

"; print ($b == $c) ? "b == c

" : "b != c

"; print ($a == $c) ? "a == c

" : "a != c

"; print ($a == $d) ? "a == d

" : "a != d

"; print ($b == $d) ? "b == d

" : "b != d

"; print ($c == $d) ? "c == d

" : "c != d

"; ?> % php equality.php a == b b != c a == c a == d b != d c != d %

Update (2007-12-11): It gets even worse. Check this out.