If I have an array in PHP that is currently zero, should access to the undefined index not contain an E_NOTICE level error?
If I have the following code snippet:
$myArray = null;
echo $myArray['foo']['bar'];
I would expect an error, but no problem. I checked that my log level is set to E_ALL. Is there something I am missing or is PHP happy to return null for undefined indexes until you try to modify the data?
source
share