日期:2014-05-16  浏览次数:20384 次

PHP内置的预定义常量大全
核心预定义常量(这些常量是PHP中的定义。这包括PHP,Zend引擎和SAPI模块):
PHP_VERSION (string)
PHP_MAJOR_VERSION (integer)    可用自: PHP 5.2.7. 
PHP_MINOR_VERSION (integer)    可用自: PHP 5.2.7. 
PHP_RELEASE_VERSION (integer)    可用自: PHP 5.2.7. 
PHP_VERSION_ID (integer)    可用自: PHP 5.2.7. 
PHP_EXTRA_VERSION (string)    可用自: PHP 5.2.7. 
PHP_ZTS (integer)    可用自: PHP 5.2.7. 
PHP_DEBUG (integer)    可用自: PHP 5.2.7. 
PHP_MAXPATHLEN (integer)    可用自: PHP 5.3.0. 
PHP_OS (string)
PHP_SAPI (string)    可用自: PHP 4.2.0. 参见: php_sapi_name(). 
PHP_EOL (string)    可用自: PHP 4.3.10 and PHP 5.0.2 
PHP_INT_MAX (integer)    可用自: PHP 4.4.0 and PHP 5.0.5 
PHP_INT_SIZE (integer)    可用自: 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)    可用自: 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)    可用自: PHP 4.3.0 
PHP_OUTPUT_HANDLER_START (integer)
PHP_OUTPUT_HANDLER_CONT (integer)
PHP_OUTPUT_HANDLER_END (integer)
PHP_WINDOWS_VERSION_MAJOR (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_VERSION_MINOR (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_VERSION_BUILD (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_VERSION_PLATFORM (integer)   可用自: PHP 5.3.0 
PHP_WINDOWS_VERSION_SP_MAJOR (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_VERSION_SP_MINOR (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_VERSION_SUITEMASK (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_VERSION_PRODUCTTYPE (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_NT_DOMAIN_CONTROLLER (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_NT_SERVER (integer)    可用自: PHP 5.3.0 
PHP_WINDOWS_NT_WORKSTATION (integer)    可用自: 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)    可用自: PHP 5.3.0 
E_USER_DEPRECATED (integer)    可用自: PHP 5.3.0 
E_ALL (integer)
E_STRICT (integer)    可用自: PHP 5.0.0 
__COMPILER_HALT_OFFSET__ (integer)    可用自: PHP 5.1.0 
TRUE (boolean)    参见: Booleans. 
FALSE (boolean)    参见: Booleans. 
NULL (boolean)    参见: Null. 

标准预定义常量(这些常量是PHP默认定义):
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 (f