In PHP, is NULL
a constant or a keyword?
I've heard that it's a constant, but it seems like the behavior of PHP
keywords (which are not case-sensitive)?
Example:
echo NULL;
echo null;
exit('teste');
EXIT('teste');
In PHP, is NULL
a constant or a keyword?
I've heard that it's a constant, but it seems like the behavior of PHP
keywords (which are not case-sensitive)?
Example:
echo NULL;
echo null;
exit('teste');
EXIT('teste');
NULL
is a type according to the Link documentation and is also the only possible value of type NULL
(confusing but that's what it is in the documentation)
Then through the documentation you can check that NULL is:
NULL is the only possible value of type NULL.
it was assimilated with the constant NULL.
NULL is the only possible value of type NULL.
Just complementing @ricard :
Some represent things that look like functions, some seem constants but actually are not really: they are language constructors.
Examples of keywords:
Some that are also (but actually look like functions)
To learn more, visit documentation .
NULL in php is a type that represents the absence of value, in some languages is represented by NIL!