svn: /phpdoc/zh/trunk/appendices/migration80/ new-features.xml

[email protected] (Dai Jie) Fri, 27 Nov 2020 05:55:53 +0000
Newsgroups php.doc.zh
Message-ID <[email protected]>
daijie                                   Fri, 27 Nov 2020 05:55:53 +0000

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

Log:
Sync with en

Changed paths:
    U   phpdoc/zh/trunk/appendices/migration80/new-features.xml

Modified: phpdoc/zh/trunk/appendices/migration80/new-features.xml
===================================================================
--- phpdoc/zh/trunk/appendices/migration80/new-features.xml	2020-11-27 02:21:08 UTC (rev 351691)
+++ phpdoc/zh/trunk/appendices/migration80/new-features.xml	2020-11-27 05:55:53 UTC (rev 351692)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 351500 Maintainer: avenger Status: partial -->
+<!-- EN-Revision: 351582 Maintainer: avenger Status: partial -->
 <!-- Reviewed: no -->

 <sect1 xml:id="migration80.new-features" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -10,7 +10,7 @@
   <title>PHP 核心中的新特性</title>

   <sect3 xml:id="migration80.new-features.core.named-arguments">
-   <title>Named Arguments</title>
+   <title>命名参数</title>

    <para>
     <!-- RFC: https://wiki.php.net/rfc/named_params -->
@@ -18,10 +18,10 @@
   </sect3>

   <sect3 xml:id="migration80.new-features.core.attributes">
-   <title>Attributes</title>
+   <title>注解(Attributes)</title>

    <para>
-    Support for Attributes has been added.
+    新增注解的功能。
     <!-- RFC: https://wiki.php.net/rfc/attributes_v2 -->
     <!-- RFC: https://wiki.php.net/rfc/attribute_amendments -->
     <!-- RFC: https://wiki.php.net/rfc/shorter_attribute_syntax -->
@@ -40,52 +40,52 @@
   </sect3>

   <sect3 xml:id="migration80.new-features.core.union-types">
-   <title>Union Types</title>
+   <title>联合类型</title>

    <para>
-    Support for <link linkend="language.types.declarations.union">union types</link> has been added.
+    新增 <link linkend="language.types.declarations.union">联合类型</link>。
     <!-- RFC: https://wiki.php.net/rfc/union_types_v2 -->
    </para>
   </sect3>

   <sect3 xml:id="migration80.new-features.core.match">
-   <title>Match Expression</title>
+   <title>Match 表达式</title>

    <para>
-    Support for <link linkend="control-structures.match"><literal>match</literal> expressions</link> has been added.
+    新增 <link linkend="control-structures.match"><literal>match</literal> 表达式</link>。
     <!-- RFC: https://wiki.php.net/rfc/match_expression_v2 -->
    </para>
   </sect3>

   <sect3 xml:id="migration80.new-features.core.nullsafe-operator">
-   <title>Nullsafe Operator</title>
+   <title>Nullsafe 运算符</title>

    <para>
-    Support for the nullsafe operator (<literal>?-></literal>) has been added.
+    新增 Nullsafe 运算符(<literal>?-></literal>)。
     <!-- RFC: https://wiki.php.net/rfc/nullsafe_operator -->
    </para>
   </sect3>

   <sect3 xml:id="migration80.new-features.core.others">
-   <title>Other new Features</title>
+   <title>其他新特性</title>

    <itemizedlist>
     <listitem>
      <para>
       <!-- we cannot use <classname>WeakMap</classname> because that would link to the wrong class -->
-      The <literal>WeakMap</literal> class has been added.
+      新增 <literal>WeakMap</literal> 类。
       <!-- RFC: https://wiki.php.net/rfc/weak_maps -->
      </para>
     </listitem>
     <listitem>
      <para>
-      The <classname>ValueError</classname> class has been added.
+      新增 <classname>ValueError</classname> 类。
      </para>
     </listitem>
     <listitem>
      <para>
-      Any number of function parameters may now be replaced by a variadic argument, as long as the
-      types are compatible. For example, the following code is now allowed:
+      现在,只要类型兼容,任意数量的函数参数都可以用一个可变参数替换。
+      例如允许编写下面的代码:
      </para>
      <para>
       <programlisting role="php">
@@ -123,8 +123,7 @@
     </listitem>
     <listitem>
      <para>
-      It is now possible to fetch the class name of an object using
-      <code>$object::class</code>. The result is the same as <code>get_class($object)</code>.
+      现在可以通过 <code>$object::class</code> 获取类名,返回的结果和 <code>get_class($object)</code> 一致。
       <!-- RFC: https://wiki.php.net/rfc/class_name_literal_on_object -->
      </para>
     </listitem>
@@ -562,12 +561,12 @@
    </listitem>
    <listitem>
     <para>
-     New <methodname>ZipArchive::setProgressCallback</methodname> to provide updates during archive close.
+     New <methodname>ZipArchive::registerProgressCallback</methodname> to provide updates during archive close.
     </para>
    </listitem>
    <listitem>
     <para>
-     New <methodname>ZipArchive::setCancelCallback</methodname> to allow cancellation during archive
+     New <methodname>ZipArchive::registerCancelCallback</methodname> to allow cancellation during archive
      close.
     </para>
    </listitem>