3 ms·
Although your guess is as good as mine as to why the author was surprised by 0 == false I don't think he was surprised. Based on the post title, I gathered th
by briancooley 18y ago
Although your guess is as good as mine as to why the author was surprised by 0 == false
I don't think he was surprised. Based on the post title, I gathered that he was just using that fact to set up an oddity.
The point here seems to be merely that non-empty strings can evaluate to true or false depending on whether they are typecast during the comparison. But that's less of an attention-grabber than true == false, particularly since the latter is patently false in PHP.