Two different strings. after comparison, php considers them to be equal. it is strange if ("0e1683" = "0e0473 "){
Echo "equal ";
}
The comparison between "0e0983" and "0e0473" is also equal. why?
Reply to discussion (solution)
This statement is very special and can only be used for comparison of generations.
If ("0e1683" = "0e0473 ")
The reason is as follows:
Php automatically converts the data type during the comparison so that the data types on both sides of the expression are consistent. Is this simple? Different things cannot be compared.
For example, a piece of white paper and a bill cannot be compared.
Php observed that 0e1683 and 0e0473 are both numerical values of scientific notation, so they are compared by numerical values.
While 0e1683 represents 0 multiplied by 10 to the power of 1683, and the result is 0 (0 multiplied by any number is 0)
Similarly, 0e0473 is also 0.
0 = 0
The expression is true.
The explanation is clear. thank you!