PHP Changshime is considered case-sensitive. Traditionally, constant identifiers are always capitalized.
The PHP constant name and any other PHP tags follow the same naming conventions. A valid constant name begins with a letter or underscore followed by any letter, number, or underscore. This is expressed in regular expressions: [a-za-z_\x7f-\xff][a-za-z0-9_\x7f-\xff]*.
Copy the Code code as follows:
A valid constant name
Define ("FOO", "something");
Define ("FOO2", "something Else");
Define ("Foo_bar", "something More");
Illegal constant name
Define ("2FOO", "something");
The following definitions are legal, but should be avoided: (Custom constants do not start with __)
Maybe someday php will define a __foo__ magic constant.
This will conflict with your code.
Define ("__foo__", "something");
?>
Summarize:
1. Custom Constants
* Must be defined with function define ()
* The value cannot be changed after the definition is complete
* Use the constant name directly, not the same as the variable in the front plus $s
2 System constants:
File:P hp program filename
Line:P HP program file lines
Php_version: The version number of the current parser
Php_os: Executes the current PHP version of the operating system name
__file__ the file name of the script that is currently being processed.
__LINE__ the current number of rows in the script file currently being processed, as in the previous.
True indicates truth (true).
False indicates a pseudo-value (false).
E_error This constant refers to the most recent error.
E_warning This volume refers to the nearest warning point.
E_parse This constant is a potential problem in parsing syntax.
http://www.bkjia.com/PHPjc/769239.html www.bkjia.com true http://www.bkjia.com/PHPjc/769239.html techarticle PHP Changshime is considered case-sensitive. Traditionally, constant identifiers are always capitalized. The PHP constant name and any other PHP tags follow the same naming conventions. A valid constant name is a letter or a stroke ...