On Jun 2, 2009, at 10:09 AM, Eric Stadtherr wrote:
Like most other languages, PHP won't evaluate the second sub- expression in an " && " expression if the first evaluates to false. My proposed
order was intentional based on that fact.
OK, I don't have a hard CS background, didn't know that.
It is a very specific problem, but a common problem nonetheless. For example, HTML 5 *requires* this misinterpretation:
http://dev.w3.org/html5/spec/Overview.html#character-encodings-0
Wow.
That is a huge break from XHTML.
I haven't really read through the HTML 5 spec ( in fact, the draft
was updated today, again ) so I wasn't aware of that.
At least there is a big disclaimer :
Note: The requirement to treat certain encodings as other encodings
according to the table above is a willful violation of the W3C
Character Model specification, motivated by a desire for
compatibility with legacy content
I see what's going on now, and I agree, mimicking what a HTML 5
browser would do is a good idea.