The difference between $array [0] and $array[' 0 ']
such as the title $array 0= $array [0] and $array0= $array [' 0 '] can get the first value of the array to distinguish
------to solve the idea----------------------
References:
as long as it is a number, there is no difference between a numeric type and a character type
Var_dump (3.2 = = ' 3.2 '); True
Quote: References:
Quote: References:
Because they're all numbers 0, so there's no difference.
What if we change to 1 2 3?
The return true is because the automatic conversion data type to compare, if you replace with = = = To compare, return is false.
PHP is a weakly typed language that is automatically converted to the appropriate data type at the time of operation.
Just made the next test, and came to the conclusion that:
Quoted integer strings are automatically converted to numbers, indexed as integers, non-integer numbers are not converted, and are still treated as string indexes.
unquoted numbers, non-integers are rounded and then indexed as integers
In addition, a string that is undefined as a constant is indexed, without the quotation marks, although the correct result can be obtained, but there is a warning error.