php 内核预定义常量

PHP_VERSION (string)

---当前PHP的版本号。

PHP_MAJOR_VERSION (integer)

The current PHP "major" version as an integer (e.g., int(5) from version "5.2.7-extra"). Available since PHP 5.2.7.

当前php“主要”版本为整数(例如,INT(5)来自版本“5.2.7-额外”)。自第5.2.7页起生效。

PHP_MINOR_VERSION (integer)

The current PHP "minor" version as an integer (e.g., int(2) from version "5.2.7-extra"). Available since PHP 5.2.7.

当前php“次要”版本为整数(例如,INT(2)来自版本“5.2.7-额外”)。自第5.2.7页起生效。

PHP_RELEASE_VERSION (integer)

The current PHP "release" version as an integer (e.g., int(7) from version "5.2.7-extra"). Available since PHP 5.2.7.

当前php“发布”版本为整数(例如,INT(7)来自版本“5.2.7-额外”)。自第5.2.7页起生效。

PHP_VERSION_ID (integer)

The current PHP version as an integer, useful for version comparisons (e.g., int(50207) from version "5.2.7-extra"). Available since PHP 5.2.7. 

当前php版本为整数,用于版本比较(例如,从版本“5.2.7-额外”中的INT(50207))。自第5.2.7页起生效。

PHP_EXTRA_VERSION (string)

The current PHP "extra" version as a string (e.g., '-extra' from version "5.2.7-extra"). Often used by distribution vendors to indicate a package version. Available since PHP 5.2.7.

当前php“额外”版本作为字符串(例如,“5.2.7-额外”版本中的“-额外”)。通常由发行商用来指示软件包版本。自第5.2.7页起生效。

PHP_ZTS (integer)

Available since PHP 5.2.7. 

非线程安全(Non Thread Safe),ZTS zend thread safety,php线程安全,适用于Apache2+worker MPM,自第5.2.7页起生效。

PHP_DEBUG (integer)

调试模式

Available since PHP 5.2.7.

PHP_MAXPATHLEN (integer)

The maximum length of filenames (including path) supported by this build of PHP. Available since PHP 5.3.0.

此构建php所支持的文件名(包括路径)的最大长度。从5.3.0开始。

PHP_OS (string)

The operating system PHP was built for. 

检查php运行环境, if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')

PHP_OS_FAMILY (string)

The operating system family PHP was built for. Either of 'Windows''BSD''Darwin''Solaris''Linux' or 'Unknown'. Available as of PHP 7.2.0.

PHP_SAPI (string)

The Server API for this build of PHP.参见 php_sapi_name()

PHP_EOL (string)

The correct 'End Of Line' symbol for this platform.自 PHP 5.0.2 起可用

PHP_INT_MAX (integer)

The largest integer supported in this build of PHP. Usually int(2147483647).自 PHP 5.0.5 起可用

PHP_INT_MIN (integer)

The smallest integer supported in this build of PHP. Usually int(-2147483648) in 32 bit systems and int(-9223372036854775808) in 64 bit systems. Available since PHP 7.0.0. Usually, PHP_INT_MIN === ~PHP_INT_MAX.

PHP_INT_SIZE (integer)

The size of an integer in bytes in this build of PHP. 自 PHP 5.0.5 起可用

PHP_FLOAT_DIG (integer)

Number of decimal digits that can be rounded into a float and back without precision loss. Available as of PHP 7.2.0.

PHP_FLOAT_EPSILON (float)

Smallest representable positive number x, so that x + 1.0 != 1.0. Available as of PHP 7.2.0.

PHP_FLOAT_MIN (float)

Smallest representable floating point number. Available as of PHP 7.2.0.

PHP_FLOAT_MAX (float)

Largest representable floating point number. Available as of PHP 7.2.0.

DEFAULT_INCLUDE_PATH (string)

PEAR_INSTALL_DIR (string)

PEAR_EXTENSION_DIR (string)

PHP_EXTENSION_DIR (string)

PHP_PREFIX (string)

The value "--prefix" was set to at configure.

PHP_BINDIR (string)

Specifies where the binaries were installed into.

PHP_BINARY (string)

Specifies the PHP binary path during script execution. Available since PHP 5.4.

PHP_MANDIR (string)

Specifies where the manpages were installed into. Available since PHP 5.3.7.

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)

The build-platform's shared library suffix, such as "so" (most Unixes) or "dll" (Windows).

PHP_FD_SETSIZE (string)

The maximum number of file descriptors for select system calls. Available as of PHP 7.1.0.

E_ERROR (integer)

Error reporting constant

E_WARNING (integer)

Error reporting constant

E_PARSE (integer)

Error reporting constant

E_NOTICE (integer)

Error reporting constant

E_CORE_ERROR (integer)

Error reporting constant

E_CORE_WARNING (integer)

Error reporting constant

E_COMPILE_ERROR (integer)

Error reporting constant

E_COMPILE_WARNING (integer)

Error reporting constant

E_USER_ERROR (integer)

Error reporting constant

E_USER_WARNING (integer)

Error reporting constant

E_USER_NOTICE (integer)

Error reporting constant

E_RECOVERABLE_ERROR (integer)

Error reporting constant. Available since PHP 5.2.0

E_DEPRECATED (integer)

Error reporting constant. Available since PHP 5.3.0

E_USER_DEPRECATED (integer)

Error reporting constant. Available since PHP 5.3.0

E_ALL (integer)

Error reporting constant

E_STRICT (integer)

Error reporting constant

__COMPILER_HALT_OFFSET__ (integer)

自 PHP 5.1.0 起有效

TRUE (boolean)

See Booleans.

FALSE (boolean)

See Booleans.

NULL (null)

See Null.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值