I have a very simple question. In PHP,
if (\'abc\' == 0){
//true
}
if (\'abc\' == 1){
//false
}
I know that this page tell us that
The relevant table can be found here. It is important what type both operands have, based on that one or both values will be converted.
In your first case, the rules of both sides being "string, resource or number" is the first applicable, and the rule is "Translate strings and resources to numbers, usual math".
For the second example, the "Convert both sides to bool, FALSE < TRUE" rule fits.