Core Predefined Constants
These constants are defined by the PHP core. This includes PHP,
the Zend engine, and SAPI modules.
-
PHP_VERSION
( string )
-
-
PHP_MAJOR_VERSION
( integer )
-
Available since PHP 5.2.7.
-
PHP_MINOR_VERSION
( integer )
-
Available since PHP 5.2.7.
-
PHP_RELEASE_VERSION
( integer )
-
Available since PHP 5.2.7.
-
PHP_VERSION_ID
( integer )
-
Available since PHP 5.2.7.
-
PHP_EXTRA_VERSION
( string )
-
Available since PHP 5.2.7.
-
PHP_ZTS
( integer )
-
Available since PHP 5.2.7.
-
PHP_DEBUG
( integer )
-
Available since PHP 5.2.7.
-
PHP_MAXPATHLEN
( integer )
-
Available since PHP 5.3.0.
-
PHP_OS
( string )
-
-
PHP_SAPI
( string )
-
Available since PHP 4.2.0. See also php_sapi_name().
-
PHP_EOL
( string )
-
Available since PHP 4.3.10 and PHP 5.0.2
-
PHP_INT_MAX
( integer )
-
Available since PHP 4.4.0 and PHP 5.0.5
-
PHP_INT_SIZE
( integer )
-
Available since PHP 4.4.0 and PHP 5.0.5
-
DEFAULT_INCLUDE_PATH
( string )
-
-
PEAR_INSTALL_DIR
( string )
-
-
PEAR_EXTENSION_DIR
( string )
-
-
PHP_EXTENSION_DIR
( string )
-
-
PHP_PREFIX
( string )
-
Available since PHP 4.3.0
-
PHP_BINDIR
( 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 )
-
Available since PHP 4.3.0
-
PHP_OUTPUT_HANDLER_START
( integer )
-
-
PHP_OUTPUT_HANDLER_CONT
( integer )
-
-
PHP_OUTPUT_HANDLER_END
( integer )
-
-
PHP_WINDOWS_VERSION_MAJOR
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_VERSION_MINOR
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_VERSION_BUILD
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_VERSION_PLATFORM
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_VERSION_SP_MAJOR
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_VERSION_SP_MINOR
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_VERSION_SUITEMASK
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_VERSION_PRODUCTTYPE
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_NT_DOMAIN_CONTROLLER
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_NT_SERVER
( integer )
-
Available since PHP 5.3.0
-
PHP_WINDOWS_NT_WORKSTATION
( integer )
-
Available since PHP 5.3.0
-
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_DEPRECATED
( integer )
-
Available since PHP 5.3.0
-
E_USER_DEPRECATED
( integer )
-
Available since PHP 5.3.0
-
E_ALL
( integer )
-
-
E_STRICT
( integer )
-
Available since PHP 5.0.0
-
__COMPILER_HALT_OFFSET__
( integer )
-
Available since PHP 5.1.0
-
TRUE
( boolean )
-
See Booleans.
-
FALSE
( boolean )
-
See Booleans.
-
NULL
( boolean )
-
See Null.
See also: Magic
constants.