null Or Boolean As Array

no-email (Damien Seguy), Damien Seguy
Thu, 04 Jan 2024 00:00:00 +0000

Null and booleans support the array syntax, but always return NULL as value. Since PHP 7.4, they also report a warning, as this is not good code.
Arrays also report errors when the key type is not valid, such as another array or an object.
Interestingly, Null and boolean accept illegal keys, with a simple warning.