phpnull

Difference between NULL and null in PHP


Is there a difference between NULL and null in PHP? Sometimes they seem to be interchangeable and sometimes not.

edit: for some reason when I read the documentation linked to in the answer (before posting this question) I read it as "case sensitive" instead of "case insensitive" which was the whole reason I posted this question in the first place...


Solution

  • Null is case insensitive.

    From the documentation:

    There is only one value of type null, and that is the case-insensitive constant null.