in php.net the following is written:
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
var_dump("10" == "1e1"); // 10 == 10 -> truevar_dump(100 == "1e2"); // 100 == 100 -> true
why in the first example it is evaluated as true but, the statement $num = (int)"1e1" ; is evaluated as 1 and not 10??? furthermore, why in the second example it is evaluated as true but the statement $num = (int)"1e2" ; is evaluated as 1 and not 100??