PHP Constants: IntroductionTag: Constants Category: PHP Basicpost: 08 Mar 2008 read: 786 PHP Constants Step By Step Tutorial: Constant is an expression which have a value remain means that it is not change during the program/script execution. Constant is also called with the term of literal. Constant is usually used to assign value remain at calculation. Note: Constant have the global characteristic, it means that constant can be accessed from any part in script without the abusively scope access. To define a constant, you can use the function of define(). Only data type of scalar (boolean, integer, float, and string) which can be used as the data type of constant. The identifier name for constant is mould and declare without early with the dollar sign($).
In the example of the script above, the changes of the $interest constant value and 0.15 is not have an effect when mould as constant. |
| | Give Your Opinion | Recommend |
|


