svn: /phpdoc/zh/trunk/appendices/ comparisons.xml migration70/new-features.xml migration70/new-functions.xml reserved.constants.core.xml

[email protected] (Bole Chen) Tue, 10 Nov 2020 13:53:27 +0000
Newsgroups php.doc.zh
Message-ID <[email protected]>
avenger                                  Tue, 10 Nov 2020 13:53:27 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=351352

Log:
sync to en.

Changed paths:
    U   phpdoc/zh/trunk/appendices/comparisons.xml
    U   phpdoc/zh/trunk/appendices/migration70/new-features.xml
    U   phpdoc/zh/trunk/appendices/migration70/new-functions.xml
    U   phpdoc/zh/trunk/appendices/reserved.constants.core.xml
svn-diffs-351352.txt (text/x-diff, 13.3 KB)
Modified: phpdoc/zh/trunk/appendices/comparisons.xml
===================================================================
--- phpdoc/zh/trunk/appendices/comparisons.xml	2020-11-10 13:13:56 UTC (rev 351351)
+++ phpdoc/zh/trunk/appendices/comparisons.xml	2020-11-10 13:53:27 UTC (rev 351352)
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
 <!-- $Author$ -->
-<!-- EN-Revision: n/a Maintainer: Altair Status: ready -->
+<!-- EN-Revision: 351133 Maintainer: Altair Status: ready -->
 <!-- CREDITS: class007 -->
 <appendix xml:id="types.comparisons" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
  <title>PHP 类型比较表</title>
  <para>
   以下的表格显示了 PHP
-  <link linkend="language.types">类型</link>和<link
-  linkend="language.operators.comparison">比较运算符</link>在松散和严格比较时的作用。该补充材料还和<link
-  linkend="language.types.type-juggling">类型戏法</link>的相关章节内容有关。同时,大量的用户注释和
+  <link linkend="language.types">类型</link> 和 <link
+  linkend="language.operators.comparison">比较运算符</link> 在松散和严格比较时的作用。该补充材料还和 <link
+  linkend="language.types.type-juggling">类型戏法</link> 的相关章节内容有关。同时,大量的用户注释和
   <link xlink:href="&url.blueshoes.comparisons;">BlueShoes</link> 的工作也给该材料提供了帮助。
  </para>
  <para>
@@ -30,7 +30,18 @@
    <function>isset</function> 函数来初始化变量。
   </para>
  </note>
+ <note>
   <para>
+   Some numeric operations can result in a value represented by the constant
+   <constant>NAN</constant>. Any loose or strict comparisons of this value
+   against any other value, including itself, but except &true;, will have a result of &false;.
+   (i.e. <literal>NAN != NAN</literal> and <literal>NAN !== NAN</literal>)
+   Examples of operations that produce <constant>NAN</constant> include
+   <literal>sqrt(-1)</literal>, <literal>asin(2)</literal>, and
+   <literal>acosh(0)</literal>.
+  </para>
+ </note>
+ <para>
   <table>
    <title>使用 PHP 函数对变量 <varname>$x</varname> 进行比较</title>
    <tgroup cols="6">
@@ -86,6 +97,14 @@
       <entry>&false;</entry>
      </row>
      <row>
+      <entry><literal>$x = array('a', 'b');</literal></entry>
+      <entry><type>array</type></entry>
+      <entry>&false;</entry>
+      <entry>&false;</entry>
+      <entry>&true;</entry>
+      <entry>&true;</entry>
+     </row>
+     <row>
       <entry><literal>$x = false;</literal></entry>
       <entry><type>boolean</type></entry>
       <entry>&true;</entry>
@@ -183,9 +202,9 @@
      </row>
     </tbody>
    </tgroup>
-  </table>
+   </table>
  </para>
-
+
  <para>
   <table xml:id="types.comparisions-loose">
    <title>松散比较 <literal>==</literal></title>
@@ -392,7 +411,7 @@
    </tgroup>
   </table>
  </para>
-
+
  <para>
   <table xml:id="type.comparisons-strict">
    <title>严格比较 <literal>===</literal></title>

Modified: phpdoc/zh/trunk/appendices/migration70/new-features.xml
===================================================================
--- phpdoc/zh/trunk/appendices/migration70/new-features.xml	2020-11-10 13:13:56 UTC (rev 351351)
+++ phpdoc/zh/trunk/appendices/migration70/new-features.xml	2020-11-10 13:53:27 UTC (rev 351352)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 340428 Maintainer: Ernest Too Status: ready -->
+<!-- EN-Revision: 351133 Maintainer: Ernest Too Status: ready -->
 <!-- Reviewed: no -->

 <sect1 xml:id="migration70.new-features" xmlns:xlink="http://www.w3.org/1999/xlink">

Modified: phpdoc/zh/trunk/appendices/migration70/new-functions.xml
===================================================================
--- phpdoc/zh/trunk/appendices/migration70/new-functions.xml	2020-11-10 13:13:56 UTC (rev 351351)
+++ phpdoc/zh/trunk/appendices/migration70/new-functions.xml	2020-11-10 13:53:27 UTC (rev 351352)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
 <!-- EN-Revision: 338439 Maintainer: Ernest Too Status: ready -->
-<!-- Reviewed: no -->

 <sect1 xml:id="migration70.new-functions">
  <title>新函数</title>

Modified: phpdoc/zh/trunk/appendices/reserved.constants.core.xml
===================================================================
--- phpdoc/zh/trunk/appendices/reserved.constants.core.xml	2020-11-10 13:13:56 UTC (rev 351351)
+++ phpdoc/zh/trunk/appendices/reserved.constants.core.xml	2020-11-10 13:53:27 UTC (rev 351352)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
+<!-- EN-Revision: 351133 Maintainer: avenger Status: ready -->
 <!-- $Author$ -->
-<!-- EN-Revision: 342973 -->
 <sect2 xml:id="reserved.constants.core" xmlns="http://docbook.org/ns/docbook">
  <title>内核预定义常量</title>
  <simpara>
@@ -23,7 +23,7 @@
   <varlistentry xml:id="constant.php-major-version">
      <term>
       <constant>PHP_MAJOR_VERSION</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -35,7 +35,7 @@
     <varlistentry xml:id="constant.php-minor-version">
      <term>
       <constant>PHP_MINOR_VERSION</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -47,7 +47,7 @@
     <varlistentry xml:id="constant.php-release-version">
      <term>
       <constant>PHP_RELEASE_VERSION</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -59,7 +59,7 @@
     <varlistentry xml:id="constant.php-version-id">
      <term>
       <constant>PHP_VERSION_ID</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -86,7 +86,7 @@
     <varlistentry xml:id="constant.php-zts">
      <term>
       <constant>PHP_ZTS</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -97,7 +97,7 @@
     <varlistentry xml:id="constant.php-debug">
      <term>
       <constant>PHP_DEBUG</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -108,7 +108,7 @@
     <varlistentry xml:id="constant.php-maxpathlen">
      <term>
       <constant>PHP_MAXPATHLEN</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -161,7 +161,7 @@
    </term>
    <listitem>
     <simpara>
-     The correct 'End Of Line' symbol for this platform.自 PHP 5.0.2 起可用
+     当前平台中对于换行符的定义。自 PHP 5.0.2 起可用
     </simpara>
    </listitem>
   </varlistentry>
@@ -168,11 +168,11 @@
   <varlistentry xml:id="constant.php-int-max">
    <term>
     <constant>PHP_INT_MAX</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
-     The largest integer supported in this build of PHP. Usually int(2147483647).自 PHP 5.0.5 起可用
+     当前 PHP 版本支持的最大整型数字。在 32 位系统中通常为 int(2147483647),64 位系统中为 int(9223372036854775807)。自 PHP 5.0.5 起可用。
     </simpara>
    </listitem>
   </varlistentry>
@@ -179,13 +179,11 @@
   <varlistentry xml:id="constant.php-int-min">
      <term>
       <constant>PHP_INT_MIN</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
-       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 版本支持的最大整型数字。在 32 位系统中通常为 int(-2147483648),64 系统中为 int(-9223372036854775808)。自 PHP 7.0.0 起可用。通常情况下 PHP_INT_MIN === ~PHP_INT_MAX。
       </simpara>
      </listitem>
     </varlistentry>
@@ -192,7 +190,7 @@
     <varlistentry xml:id="constant.php-int-size">
    <term>
     <constant>PHP_INT_SIZE</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -203,7 +201,7 @@
   <varlistentry xml:id="constant.php-float-dig">
      <term>
       <constant>PHP_FLOAT_DIG</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -233,7 +231,8 @@
      </term>
      <listitem>
       <simpara>
-       Smallest representable floating point number.
+       Smallest representable <emphasis>positive</emphasis> floating point number.
+       If you need the smallest representable <emphasis>negative</emphasis> floating point number, use <literal>- PHP_FLOAT_MAX</literal>.
        Available as of PHP 7.2.0.
       </simpara>
      </listitem>
@@ -423,7 +422,7 @@
   <varlistentry xml:id="constant.e-error">
    <term>
     <constant>E_ERROR</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -434,7 +433,7 @@
   <varlistentry xml:id="constant.e-warning">
    <term>
     <constant>E_WARNING</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -445,7 +444,7 @@
   <varlistentry xml:id="constant.e-parse">
    <term>
     <constant>E_PARSE</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -456,7 +455,7 @@
   <varlistentry xml:id="constant.e-notice">
    <term>
     <constant>E_NOTICE</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -467,7 +466,7 @@
   <varlistentry xml:id="constant.e-core-error">
    <term>
     <constant>E_CORE_ERROR</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -478,7 +477,7 @@
   <varlistentry xml:id="constant.e-core-warning">
    <term>
     <constant>E_CORE_WARNING</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -489,7 +488,7 @@
   <varlistentry xml:id="constant.e-compile-error">
    <term>
     <constant>E_COMPILE_ERROR</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -500,7 +499,7 @@
   <varlistentry xml:id="constant.e-compile-warning">
    <term>
     <constant>E_COMPILE_WARNING</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -511,7 +510,7 @@
   <varlistentry xml:id="constant.e-user-error">
    <term>
     <constant>E_USER_ERROR</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -522,7 +521,7 @@
   <varlistentry xml:id="constant.e-user-warning">
    <term>
     <constant>E_USER_WARNING</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -533,7 +532,7 @@
   <varlistentry xml:id="constant.e-user-notice">
    <term>
     <constant>E_USER_NOTICE</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -544,7 +543,7 @@
   <varlistentry xml:id="constant.e-recoverble-error">
      <term>
       <constant>E_RECOVERABLE_ERROR</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -556,7 +555,7 @@
     <varlistentry xml:id="constant.e-deprecated">
      <term>
       <constant>E_DEPRECATED</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -568,7 +567,7 @@
     <varlistentry xml:id="constant.e-user-deprecated">
      <term>
       <constant>E_USER_DEPRECATED</constant>
-      (<type>integer</type>)
+      (<type>int</type>)
      </term>
      <listitem>
       <simpara>
@@ -580,7 +579,7 @@
     <varlistentry xml:id="constant.e-all">
    <term>
     <constant>E_ALL</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -591,7 +590,7 @@
     <varlistentry xml:id="constant.e-strict">
    <term>
     <constant>E_STRICT</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -602,7 +601,7 @@
     <varlistentry xml:id="constant.compiler-halt-offset">
    <term>
     <constant>__COMPILER_HALT_OFFSET__</constant>
-    (<type>integer</type>)
+    (<type>int</type>)
    </term>
    <listitem>
     <simpara>
@@ -643,9 +642,33 @@
     </simpara>
    </listitem>
   </varlistentry>
+    <varlistentry xml:id="constant.php-windows-event-ctrl-c">
+     <term>
+      <constant>PHP_WINDOWS_EVENT_CTRL_C</constant>
+      (<type>int</type>)
+     </term>
+     <listitem>
+      <simpara>
+       A Windows <literal>CTRL+C</literal> event.
+       Available as of PHP 7.4.0 (Windows only).
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry xml:id="constant.php-windows-event-ctrl-break">
+     <term>
+      <constant>PHP_WINDOWS_EVENT_CTRL_BREAK</constant>
+      (<type>int</type>)
+     </term>
+     <listitem>
+      <simpara>
+       A Windows <literal>CTRL+BREAK</literal> event.
+       Available as of PHP 7.4.0 (Windows only).
+      </simpara>
+     </listitem>
+    </varlistentry>
  </variablelist>
  <para>
-  参见<link linkend="language.constants.predefined">魔术常量</link>。
+  参见 <link linkend="language.constants.predefined">魔术常量</link>。
  </para>
 </sect2>