0

I stumbled across this irritating behaviour of my PHP-Installation:

$myArray = null;  
$myValue = $myArray['some_index']; // <--- this does not even throw a notice!!

I have error_reporting on E_ALL, no error_handler in place. Did I misconfigure anything?

Trying this:

$myArray = array();
$myValue = $myArray['some_index']; // <--- does throw notice as expected.

What am I missing? Trying to access null as an array should at least thow a notice?

Tobias Gassmann
  • 11,399
  • 15
  • 58
  • 92

0 Answers0