Hacker News new | ask | show | jobs
by LinAGKar 1168 days ago
No, here they were both the same type, but they were cast to int anyway.
1 comments

I understand, but the root cause is allowing equality checks between different types. As a result of that decision you need cascading rules on what conversions take higher priority then others. Clearly php has decided that when a string goes through an equality check against another object, that integer conversion is placed above byte comparison