Usually comparing with false is done like this where false is on right side:
if(strpos($str, 'php') !== false) {
// code
}
But I have also noticed at various places false on left side:
if(false !== strpos($str, 'php')) {
// code
}
As far as I understand, they are same then why some people put false on left side? Is there anything special about it, something I am missing ?
Thats something inattentive developers invented
The “problem”
The solution
Latter one will fail and thus the developer sees, that he misses an additional
=,!, … here