I am studying PHP and came across a question like this:
What is the output of the following array?
Code:
$a = array(0.001 => 'b', .1 => 'c');
print_r($a);
The answer is 0 => 'c'
- now I know array keys can't be numbers but wouldn't that throw an error? Why is the first element overwritten?