These constants are defined by the PHP core. This includes PHP, the Zend engine, and SAPI modules.
PHP_VERSION
(string)
PHP_MAJOR_VERSION
(integer)
PHP_MINOR_VERSION
(integer)
PHP_RELEASE_VERSION
(integer)
PHP_VERSION_ID
(integer)
PHP_EXTRA_VERSION
(string)
PHP_ZTS
(integer)
PHP_DEBUG
(integer)
PHP_MAXPATHLEN
(integer)
PHP_OS
(string)
PHP_OS_FAMILY
(string)
'Windows'
, 'BSD'
,
'Darwin'
, 'Solaris'
,
'Linux'
or 'Unknown'
.
Available as of PHP 7.2.0.
PHP_SAPI
(string)
PHP_EOL
(string)
PHP_INT_MAX
(integer)
PHP_INT_MIN
(integer)
PHP_INT_SIZE
(integer)
PHP_FLOAT_DIG
(integer)
PHP_FLOAT_EPSILON
(float)
x + 1.0 !=
1.0
.
Available as of PHP 7.2.0.
PHP_FLOAT_MIN
(float)
- PHP_FLOAT_MAX
.
Available as of PHP 7.2.0.
PHP_FLOAT_MAX
(float)
DEFAULT_INCLUDE_PATH
(string)
PEAR_INSTALL_DIR
(string)
PEAR_EXTENSION_DIR
(string)
PHP_EXTENSION_DIR
(string)
PHP_PREFIX
(string)
PHP_BINDIR
(string)
PHP_BINARY
(string)
PHP_MANDIR
(string)
PHP_LIBDIR
(string)
PHP_DATADIR
(string)
PHP_SYSCONFDIR
(string)
PHP_LOCALSTATEDIR
(string)
PHP_CONFIG_FILE_PATH
(string)
PHP_CONFIG_FILE_SCAN_DIR
(string)
PHP_SHLIB_SUFFIX
(string)
PHP_FD_SETSIZE
(string)
E_ERROR
(integer)
E_WARNING
(integer)
E_PARSE
(integer)
E_NOTICE
(integer)
E_CORE_ERROR
(integer)
E_CORE_WARNING
(integer)
E_COMPILE_ERROR
(integer)
E_COMPILE_WARNING
(integer)
E_USER_ERROR
(integer)
E_USER_WARNING
(integer)
E_USER_NOTICE
(integer)
E_RECOVERABLE_ERROR
(integer)
E_DEPRECATED
(integer)
E_USER_DEPRECATED
(integer)
E_ALL
(integer)
E_STRICT
(integer)
__COMPILER_HALT_OFFSET__
(integer)
TRUE
(boolean)
FALSE
(boolean)
NULL
(null)
PHP_WINDOWS_EVENT_CTRL_C
(integer)
CTRL+C
event.
Available as of PHP 7.4.0 (Windows only).
PHP_WINDOWS_EVENT_CTRL_BREAK
(integer)
CTRL+BREAK
event.
Available as of PHP 7.4.0 (Windows only).
See also: Magic constants.
All constants from core extensions are defined in PHP by default.