Php (6) PHP constants 1. Custom constants
* Must be defined using the define () function
* After definition, the value cannot be changed.
* The constant name is used directly. you cannot add $ s in front of a variable.
For example: define ("PI", 3.14); defines a constant
$ Area = PI * R; calculate the area of the circle
Define ("URL", "http://www.youbml.com ");
Echo "My website is:". URL;
2 System constants:
FILE: php program FILE name
LINE: Number of PHP program files
PHP_VERSION: version number of the current parser
PHP_ OS: name of the operating system for executing the current PHP version
_ FILE _ the script FILE name being processed.
_ LINE _ current number of rows of the script file being processed, same as the previous number.
TRUE indicates the true value (TRUE ).
FALSE indicates a pseudo value (false ).
The constant E_ERROR indicates the most recent error.
E_WARNING refers to the nearest warning.
E_PARSE this constant is a potential problem with the parsing syntax.
The above is the content of the php (6) PHP constant. For more information, see The PHP Chinese website (www.php1.cn )!