Cannot Use Isset On Expression, So Use What?¶
isset() works on data containers, such as variables, properties, array elements, but not on literal or constant values.
For literal values, it is recommended to avoid using isset, but make a comparison to null, instead.
And of course, the error message is the same when the code uses both solutions at the same time. This may lead to confusion: the message suggests using null !== (NULL !== A), instead of isset(NULL !== A).
See Also¶
isset on expression [Try me]