svn: /phpdoc/zh/trunk/reference/errorfunc/ constants.xml
[email protected] (Bole Chen) Tue, 10 Nov 2020 12:41:19 +0000
| Newsgroups | php.doc.zh |
|---|---|
| Message-ID | <[email protected]> |
avenger Tue, 10 Nov 2020 12:41:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=351347
Log:
sync to en.
Changed paths:
U phpdoc/zh/trunk/reference/errorfunc/constants.xml
svn-diffs-351347.txt
(text/x-diff, 10.4 KB)
Modified: phpdoc/zh/trunk/reference/errorfunc/constants.xml
===================================================================
--- phpdoc/zh/trunk/reference/errorfunc/constants.xml 2020-11-10 06:32:34 UTC (rev 351346)
+++ phpdoc/zh/trunk/reference/errorfunc/constants.xml 2020-11-10 12:41:19 UTC (rev 351347)
@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
+<!-- EN-Revision: 351133 Maintainer: avenger Status: ready -->
<appendix xml:id="errorfunc.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
&extension.constants.core;
- <note>
- <simpara>
- 你可以使用它们在 &php.ini; 中的常量名称; 但是在PHP之外,例如在 &httpd.conf; 之中, 你必须使用二进制位掩码来代替。
- </simpara>
- </note>
+ <note>
+ <simpara>
+ 你可以使用它们在 &php.ini; 中的常量名称; 但是在 PHP 之外,例如在 &httpd.conf; 之中, 你必须使用二进制位掩码来代替。
+ </simpara>
+ </note>
+
<table xml:id="errorfunc.constants.errorlevels">
<title>错误和日志记录</title>
<tgroup cols="4">
@@ -24,7 +26,7 @@
<entry>1</entry>
<entry>
<constant>E_ERROR</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
致命的运行时错误。这类错误一般是不可恢复的情况,例如内存分配导致的问题。后果是导致脚本终止不再继续运行。
@@ -31,12 +33,12 @@
</entry>
<entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-warning">
<entry>2</entry>
<entry>
<constant>E_WARNING</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
运行时警告 (非致命错误)。仅给出提示信息,但是脚本不会终止运行。
@@ -43,12 +45,12 @@
</entry>
<entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-parse">
<entry>4</entry>
<entry>
<constant>E_PARSE</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
编译时语法解析错误。解析错误仅仅由分析器产生。
@@ -55,12 +57,12 @@
</entry>
<entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-notice">
<entry>8</entry>
<entry>
<constant>E_NOTICE</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
运行时通知。表示脚本遇到可能会表现为错误的情况,但是在可以正常运行的脚本里面也可能会有类似的通知。
@@ -67,170 +69,169 @@
</entry>
<entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-core-error">
<entry>16</entry>
<entry>
<constant>E_CORE_ERROR</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
- 在PHP初始化启动过程中发生的致命错误。该错误类似
- <constant>E_ERROR</constant>,但是是由PHP引擎核心产生的。
+ 在 PHP 初始化启动过程中发生的致命错误。该错误类似
+ <constant>E_ERROR</constant>,但是是由 PHP 引擎核心产生的。
</entry>
- <entry>since PHP 4</entry>
+ <entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-core-warning">
<entry>32</entry>
<entry>
<constant>E_CORE_WARNING</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
- PHP初始化启动过程中发生的警告 (非致命错误) 。类似 <constant>E_WARNING</constant>,但是是由PHP引擎核心产生的。
+ PHP 初始化启动过程中发生的警告 (非致命错误) 。类似 <constant>E_WARNING</constant>,但是是由 PHP 引擎核心产生的。
</entry>
- <entry>since PHP 4</entry>
+ <entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-compile-error">
<entry>64</entry>
<entry>
<constant>E_COMPILE_ERROR</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
- 致命编译时错误。类似<constant>E_ERROR</constant>,
- 但是是由Zend脚本引擎产生的。
+ 致命编译时错误。类似 <constant>E_ERROR</constant>,但是是由 Zend 脚本引擎产生的。
</entry>
- <entry>since PHP 4</entry>
+ <entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-compile-warning">
<entry>128</entry>
<entry>
<constant>E_COMPILE_WARNING</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
编译时警告 (非致命错误)。类似
- <constant>E_WARNING</constant>,但是是由Zend脚本引擎产生的。
+ <constant>E_WARNING</constant>,但是是由 Zend 脚本引擎产生的。
</entry>
- <entry>since PHP 4</entry>
+ <entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-user-error">
<entry>256</entry>
<entry>
<constant>E_USER_ERROR</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
用户产生的错误信息。类似
- <constant>E_ERROR</constant>, 但是是由用户自己在代码中使用PHP函数 <function>trigger_error</function>来产生的。
+ <constant>E_ERROR</constant>,但是是由用户自己在代码中使用 PHP 函数 <function>trigger_error</function>来产生的。
</entry>
- <entry>since PHP 4</entry>
+ <entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-user-warning">
<entry>512</entry>
<entry>
<constant>E_USER_WARNING</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
用户产生的警告信息。类似
- <constant>E_WARNING</constant>, 但是是由用户自己在代码中使用PHP函数 <function>trigger_error</function>来产生的。
+ <constant>E_WARNING</constant>,但是是由用户自己在代码中使用 PHP 函数 <function>trigger_error</function>来产生的。
</entry>
- <entry>since PHP 4</entry>
+ <entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-user-notice">
<entry>1024</entry>
<entry>
<constant>E_USER_NOTICE</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
用户产生的通知信息。类似
- <constant>E_NOTICE</constant>, 但是是由用户自己在代码中使用PHP函数 <function>trigger_error</function>来产生的。
+ <constant>E_NOTICE</constant>,但是是由用户自己在代码中使用 PHP 函数 <function>trigger_error</function>来产生的。
</entry>
- <entry>since PHP 4</entry>
+ <entry></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-strict">
<entry>2048</entry>
<entry>
<constant>E_STRICT</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
启用 PHP 对代码的修改建议,以确保代码具有最佳的互操作性和向前兼容性。
</entry>
- <entry>since PHP 5</entry>
+ <entry>PHP 5.4.0 之前的版本中不包含 <constant>E_ALL</constant></entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-recoverable-error">
<entry>4096</entry>
<entry>
<constant>E_RECOVERABLE_ERROR</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
可被捕捉的致命错误。 它表示发生了一个可能非常危险的错误,但是还没有导致PHP引擎处于不稳定的状态。 如果该错误没有被用户自定义句柄捕获 (参见
<function>set_error_handler</function>),将成为一个 <constant>E_ERROR</constant> 从而脚本会终止运行。
</entry>
- <entry>since PHP 5.2.0</entry>
+ <entry>自 PHP 5.2.0 起</entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-deprecated-error">
<entry>8192</entry>
<entry>
<constant>E_DEPRECATED</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
运行时通知。启用后将会对在未来版本中可能无法正常工作的代码给出警告。
</entry>
- <entry>since PHP 5.3.0</entry>
+ <entry>自 PHP 5.3.0 起</entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-user-deprecated">
<entry>16384</entry>
<entry>
<constant>E_USER_DEPRECATED</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
用户产少的警告信息。 类似
<constant>E_DEPRECATED</constant>, 但是是由用户自己在代码中使用PHP函数 <function>trigger_error</function>来产生的。
</entry>
- <entry>since PHP 5.3.0</entry>
+ <entry>自 PHP 5.3.0 起</entry>
</row>
-
+
<row xml:id="errorfunc.constants.errorlevels.e-all">
- <entry>30719</entry>
+ <entry>32767</entry>
<entry>
<constant>E_ALL</constant>
- (<type>integer</type>)
+ (<type>int</type>)
</entry>
<entry>
- <constant>E_STRICT</constant>出外的所有错误和警告信息。
+ PHP 5.4.0 之前为 <constant>E_STRICT</constant> 除外的所有错误和警告信息。
</entry>
<entry>
- <!-- FIXME PHP_6 32767 in PHP 6, -->
- 30719 in PHP 5.3.x,
- 6143 in PHP 5.2.x,
- 2047 previously
+ PHP 5.4.x 中为 32767,
+ PHP 5.3.x 中为 30719,
+ PHP 5.2.x 中为 6143,
+ 更早之前的 PHP 版本中为 2047。
</entry>
</row>
-
+
</tbody>
</tgroup>
</table>
-
+
<para>
- 上面的值(数值或者符号)用于建立一个二进制位掩码,来制定要报告的错误信息。可以使用按位运算符来组合这些值或者屏蔽某些类型的错误。请注意,在 &php.ini; 之中,只有'|', '~', '!', '^' 和 '&' 会正确解析。
+ 上面的值(数值或者符号)用于建立一个二进制位掩码,来制定要报告的错误信息。可以使用 <link linkend="language.operators.bitwise">按位运算符</link> 来组合这些值或者屏蔽某些类型的错误。请注意,在 &php.ini; 之中,只有'|', '~', '!', '^' 和 '&' 会正确解析。
</para>
</appendix>