Quote Originally Posted by RodG View Post
Yes, I am aware that there is a subtle difference between == and ===

Just curious, it a known fact about 'unwanted consequences' , or is it the same disclaimer that I probably should have made on the basis that it probably hasn't been tested in every possible case?

Fact or not, I agree, it doesn't make sense take the risk of retroactively changing all legacy code due to the current recommendations.

I do like the idea of making PHP a little more strict though, and for new code, the === is less likely to have unwanted consequences than the ==, and generally speaking, if I AM working on legacy code and come across the odd == I tend to automatically change it to the === and test that nothing got busted as a result (so far, I haven't busted anything by doing this), hence my curiosity as to whether the 'unwanted consequences' are real, or just something that is theoretically possible.

"I don't know either" is a perfectly acceptable answer. :-)

Cheers
Rod.
Outside of ZC I was programming some PHP to provide some information. During the initial coding I had used == for all such verification of equalities. I then chose to use === in all such cases by replacement of the two with the three. Problems followed. The most basic example of where such a problem is likely to occur is if the false statement is used to capture situations where the value is 0 or false... Certainly with a newer perspective one could evaluate using both criteria ored together, but under the "old" thought there was no need...

There may be other examples, but that is one that I have seen/experienced.