Home > Article > Backend Development > What are the most commonly used system constants in php?
This article collects some of the most commonly used system constants in PHP for your reference.
System constants
FILE The relative path of the current PHP file
LINE The current PHP file The line number
FUNCTION the current function name, only works for calls within the function
CLASS the current class name , only works for classes
PHP_VERSION The currently used PHP version number
PHP_OS The running operating system of the current PHP environment
TRUE Same as true
FALSE Same as false
M_PI Pi constant value
M_E The scientific constant e
M_LOG2E represents log2
SESSION session session variable
The above is the detailed content of What are the most commonly used system constants in php?. For more information, please follow other related articles on the PHP Chinese website!