
Filip Komar - 2015-08-04 15:16:52
I do forget to use == here and there so I use the following tip as such error is sometimes tricky to debug.
Yoda style is not clean but still useful for #2:
if(CONSTANT = $variable) will throw an error while
if($variable = CONSTANT) will not so it can easily be overlooked.