3 ms·
> using === when appropriate It’s always appropriate. A good IDE should highlight == as a warning. My code quality and programming abilities got significantly
by jw1224 4y ago
> using === when appropriate
It’s always appropriate. A good IDE should highlight == as a warning.
My code quality and programming abilities got significantly better since forcing strict types and comparisons on myself. I can’t imagine writing PHP any other way now.
- rossriley 4y agoThere are a few instances where using == is desirable, for instance it allows you to compare two instances of an object and returns true if the properties are the same. In this case === will always return false since it checks if the two instances are the same object.