Data Types, Constants, and Variables
These functions check the status of a variable, change its type, or return a value as a particular data type.
boolean define(string name, value, boolean non_case_sensitive)
The define function creates a constant, which is essentially a variable that may be set only once. The value argument may be a string, integer, double, or boolean. It may not be an array or object. The non_case_sensitive argument is optional. By default, constants are case sensitive, which is the same as with variables.
If the constant cannot be created for some reason, FALSE will be returned. If you wish to check that a constant is defined, use the defined function.
It is customary to name constants using all uppercase letters, as is the ...
Get Core PHP Programming: Using PHP to Build Dynamic Web Sites now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.