手机版

PHP保留字列表:预定义常量

2019-09-10 阅读 :

内核预定义常量

这些常量在 PHP 的内核中定义。它包含 PHP、Zend 引擎和 SAPI 模块。


PHP_VERSION
(string)
The current PHP version as a string in "major.minor.release[extra]" notation.

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_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_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_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_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_ZTS
(integer)
Available since PHP 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_OS
(string)
The operating system PHP was built for.

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.

参见魔术常量。

标准预定义常量

所有在核心扩展 的常量是 PHP 默认定义的。

服务器软件 网络工具 网站工具 服务器教程 服务器知识 服务器技术 服务器之家 vps教程 vps是什么

本文标题:PHP保留字列表:预定义常量 - 服务器教程_服务器技术_服务器知识_vps教程
本文地址:https://www.helloaliyun.com/tutorial/460.html

相关文章

  • CentOS 7 常用命令(系统关机、重启以及登出)

    关机:(系统的关机、重启以及登出 ) # 关闭系统(1)[root@localhost ~]# shutdown -h now # 关闭系统(2)[root@localhost ~]# init 0 # 关闭系统(3)[root@localhost ~]# telinit 0 # 按预定时间关闭系统[root@localhost...

    2019-12-07 服务器教程
  • linux重启命令 reboot与shutdown -r now的区别与联系

    在linux命令中reboot是重新启动,shutdown -r now是立即停止然后重新启动,都说他们两个是一样的,其实是有一定的区别的。shutdown命令可以安全地关闭或重启Linux系统,它在系统关闭之前给系统上的所有登录用户提示一条警告...

    2019-12-07 服务器教程
  • CentOS 7 如何使用命令重启或关机

    安装GNOME的朋友们首先切换到字符界面。切换到字符界面的方法如下: 先登陆进入系统,进入图形化界面,然后按Ctrl+Alt+F6(笔记本的是Ctrl+Alt+shift+Fn),进入字符界面。关机命令:shutdown或poweroffshutdown:shutdown -h now...

    2019-12-07 服务器教程
  • CentOS 7 正确关机重启的命令方法

    linux主要用于服务器领域,而在服务器上执行一项服务是永无止境的,除非遇到特殊情况,否则不会关机。和Windows不同,在linux系统下,很多进程是在后台执行的。在屏幕背后,可能有很多人同时在工作。如果直接按下电源的按钮,其他...

    2019-12-07 服务器教程
  • CentOS下的yum upgrade和yum update区别,没事别乱用!

    说明:生产环境对软件版本和内核版本要求非常精确,别没事有事随便的进行yum update操作!!!!!!!!!yum update: 升级所有包同时也升级软件和系统内核yum upgrade:只升级所有包,不升级软件和系统内核...

    2019-12-07 服务器教程
你可能感兴趣
热门浏览