You should never use
==
for string comparison.===
is OK.$something = 0; echo ('password123' == $something) ? 'true' : 'false';
Just run the above code and you’ll see why.
$something = 0; echo ('password123' === $something) ? 'true' : 'false';
The reason is that when using ‘==’ it will try to convert the string to a number, and match it!
Now where’s the emoji for facepalm?
No Comments
You can leave the first : )