The difference between php fase = $var and $var = = fase

the difference between fase = $var and $var = = fase in php conditional judgment statements. Why does Daniel like to write false or true before the comparison operator?

Php
Apr.03,2021

the result is the same. But people often make this mistake:

  

in principle, you should keep the constant on the left when using comparison operations, but most people still have habitual variables on the left, but modern IDE can be automatically corrected by code review. For example, PHPStorm

Menu