4 ms·
Well, "why such behaviour is good" is stretching it. Maybe just "why such behaviour is"?
by oconnore 15y ago
Well, "why such behaviour is good" is stretching it. Maybe just "why such behaviour is"?
- nikic 15y agoIt may be a matter of taste, but I always considered this particular feature of == beneficial. In the normal case, it is what you need (in the context that most PHP applications deal with, namely communication over HTTP and with MySQL). What is shown here is just a rare edge case that you should not normally encounter. But I think that == has some other behaviors which are really detrimental. Like 0 == 'hallo world'. Sadly those can't be fixed due to backwards compatibility.