Constante predefinite
Core Predefined Constants
These constants are defined by the PHP core. This includes PHP, the Zend engine, and SAPI modules.
- PHP_VERSION (string)
- 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)
- 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_ALL (integer)
- E_STRICT (integer)
- Available since PHP 5.0.0
- __COMPILER_HALT_OFFSET__ (integer)
- Available since PHP 5.1.0
See also: Magic constants.
Standard Predefined Constants
These constants are defined in PHP by default.
- EXTR_OVERWRITE (integer)
- EXTR_SKIP (integer)
- EXTR_PREFIX_SAME (integer)
- EXTR_PREFIX_ALL (integer)
- EXTR_PREFIX_INVALID (integer)
- EXTR_PREFIX_IF_EXISTS (integer)
- EXTR_IF_EXISTS (integer)
- SORT_ASC (integer)
- SORT_DESC (integer)
- SORT_REGULAR (integer)
- SORT_NUMERIC (integer)
- SORT_STRING (integer)
- CASE_LOWER (integer)
- CASE_UPPER (integer)
- COUNT_NORMAL (integer)
- COUNT_RECURSIVE (integer)
- ASSERT_ACTIVE (integer)
- ASSERT_CALLBACK (integer)
- ASSERT_BAIL (integer)
- ASSERT_WARNING (integer)
- ASSERT_QUIET_EVAL (integer)
- CONNECTION_ABORTED (integer)
- CONNECTION_NORMAL (integer)
- CONNECTION_TIMEOUT (integer)
- INI_USER (integer)
- INI_PERDIR (integer)
- INI_SYSTEM (integer)
- INI_ALL (integer)
- M_E (float)
- M_LOG2E (float)
- M_LOG10E (float)
- M_LN2 (float)
- M_LN10 (float)
- M_PI (float)
- M_PI_2 (float)
- M_PI_4 (float)
- M_1_PI (float)
- M_2_PI (float)
- M_2_SQRTPI (float)
- M_SQRT2 (float)
- M_SQRT1_2 (float)
- CRYPT_SALT_LENGTH (integer)
- CRYPT_STD_DES (integer)
- CRYPT_EXT_DES (integer)
- CRYPT_MD5 (integer)
- CRYPT_BLOWFISH (integer)
- DIRECTORY_SEPARATOR (string)
- SEEK_SET (integer)
- SEEK_CUR (integer)
- SEEK_END (integer)
- LOCK_SH (