diff --git a/language/operators.xml b/language/operators.xml index 94a1bdc6be..d37afe81f5 100644 --- a/language/operators.xml +++ b/language/operators.xml @@ -1096,19 +1096,21 @@ Expression: 0 = -4 << 62 - If you compare an integer with a string, excluding the identical (===) and - not identical (!==) operators, the string is - converted to a number. - If you compare two numerical strings, they are compared as integers. These - rules also apply to the - switch statement. + If you compare a number with a string or the comparison involves numerical + strings,then each string is + converted to a number + and the comparison performed numerically. These rules also apply to the + switch statement. The + type conversion does not take place when the comparison is === or !== as + this involves comparing the type as well as the value. true var_dump("1" == "01"); // 1 == 1 -> true -var_dump("1" == "1e0"); // 1 == 1 -> true +var_dump("10" == "1e1"); // 10 == 10 -> true +var_dump(100 == "1e2"); // 100 == 100 -> true switch ("a") { case 0: