Wednesday, May 6, 2015

PHP Blunder-2

Here is another 'oops!' moment for PHP. Do you remember the rule of transitivity? A related to B, and A related to C, implies that B is related to C. Right? Now apply this very understanding to the code below.
Now, foo equals true, and foo equals zero. So, according to this rule of transitivity, true equals zero?!

No comments:

Post a Comment