The following appears to work, yet I really don't think it should:
if ("'True','False'" == 0) { echo 'Hello, World.'; } Is it grepping the last False out of the string, and if so why, and how do you stop it?
Any string evaluates to 0 when being compared against a number (unless it's a stringed number such as "5" or "4string"). That's why it'll always evaluate to 0.
See the Type Comparison Table
What's really happening is that PHP is trying to do an implicit type conversion, and for one reason or another it's deciding that string when converted to an integer looks like 0. You can prove this to yourself by doing:
echo ((int) "'True','False'"); If you want to do a type-checked comparison you should use the triple equals (===):
if("'True','False'" === 0) ...which will most certainly evaluate to false.