$arr = array(); var_dump($arr['foo']);
Warning: Undefined array key "foo" in /in/FZVE3 on line 8
NULL
$arr = array(); $obj = new stdclass(); var_dump($arr[$obj]);
Fatal error: Uncaught TypeError: Illegal offset type in /in/FZVE3:11
Stack trace:
#0 {main}
thrown in /in/FZVE3 on line 11
Process exited with code 255.
Output for 7.4.33
$arr = array(); var_dump($arr['foo']);
Notice: Undefined index: foo in /in/FZVE3 on line 8
NULL
$arr = array(); $obj = new stdclass(); var_dump($arr[$obj]);
Warning: Illegal offset type in /in/FZVE3 on line 11
NULL
$arr = null; var_dump($arr['foo']);
Notice: Trying to access array offset on value of type null in /in/FZVE3 on line 16
NULL
$arr = null; $obj = new stdclass(); var_dump($arr[$obj]);
Notice: Trying to access array offset on value of type null in /in/FZVE3 on line 19
NULL
$arr = null; $arr['i'] = $arr['i'] + 1;
Notice: Trying to access array offset on value of type null in /in/FZVE3 on line 23
$arr = null; $arr['i']++;