What's the difference between 'false === $var' and '$var === false'?
问题 Is one more readable than the other? At first, I disliked the false === approach but as I see it more and more often, I'm warming up to it. I'm pretty sure they return identical results. 回答1: I greatly prefer false === $var Namely because sometimes you are only using equality and not looking for identity. In which case you write false == $var But sometimes you aren't at the top of your game, and might write false = $var which will give an immediate error, and let's you fix it right away.