In programming, a constant is a value whose value cannot change during the execution. Unlike variables, a PHP constant
Creating a PHP constant
To declare a constant, you have to use the define() function. This function takes the name of the constant as the first parameter and the value of the constant as the second parameter.
By default, a constant name is case-sensitive. The third parameter of the define function determines whether the constant name should be case-sensitive or not. The default value is false.
The following example shows how to create a case-insensitive constant.
define("PI", 3.14, true);
Accessing the value of a constant
You can access the value of a constant simply by specifying it’s name.
define("PI", 3.14); //case sensitive
define("Name", "John"); //case insensitive