While debugging some unexpected behaviour i came across the following situation:
$value = 20000;
var_dump($value['someKey']);
Unexpectedly this did not throw an error, warning, notice or even strict warning. The same can be done with a boolean of float. It does not throw any kind of error and returns null
.
Why does it allow this? For every single piece of weird behaviour in PHP I found an explaination (even though some are not really logical) but in this case i am at a loss.
Note: This question is purely out of curiosity and has no real world application.