Constants as the name indicates, as they are defined they cannot be changed during the script. A constant is an identifier. A valid constant starts with a letter of underscore, and are automatically global across the script. To set a constant, we use the function, define(). For an instance :
define (“constnt”,”This is a constant and cannot be changed”);
PHP supports three different types of comments.
- Multi-line comment as in C.
- Single-line comment (//) as in C and C++.
- Single-line comment (#) as in Perl.
Here is the code to demonstrate the above :