svn: /phpdoc/zh/trunk/appendices/migration80/ other-changes.xml
[email protected] (Dai Jie) Fri, 27 Nov 2020 07:15:13 +0000
| Newsgroups | php.doc.zh |
|---|---|
| Message-ID | <[email protected]> |
daijie Fri, 27 Nov 2020 07:15:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=351696
Log:
Translate other-changes.xml
Changed paths:
U phpdoc/zh/trunk/appendices/migration80/other-changes.xml
svn-diffs-351696.txt
(text/x-diff, 13.7 KB)
Modified: phpdoc/zh/trunk/appendices/migration80/other-changes.xml
===================================================================
--- phpdoc/zh/trunk/appendices/migration80/other-changes.xml 2020-11-27 06:15:45 UTC (rev 351695)
+++ phpdoc/zh/trunk/appendices/migration80/other-changes.xml 2020-11-27 07:15:13 UTC (rev 351696)
@@ -7,28 +7,28 @@
<title>其他变更</title>
<sect2 xml:id="migration80.other-changes.sapi">
- <title>Changes in SAPI Modules</title>
+ <title>SAPI 模块的变更</title>
<sect3 xml:id="migration80.other-changes.sapi.apache2handler">
<title>Apache2Handler</title>
<para>
- The PHP module has been renamed from <literal>php7_module</literal> to
- <literal>php_module</literal>.
+ PHP 模块从 <literal>php7_module</literal> 重命名为
+ <literal>php_module</literal>。
</para>
</sect3>
</sect2>
<sect2 xml:id="migration80.other-changes.functions">
- <title>Changed Functions</title>
+ <title>Function 的变更</title>
<sect3 xml:id="migration80.other-changes.functions.reflection">
<title>Reflection</title>
<para>
- <methodname>ReflectionClass::getConstants</methodname> and
- <methodname>ReflectionClass::getReflectionConstants</methodname> results can be now filtered via
- a new parameter <parameter>filter</parameter>. Three new constants were added to be used with it:
+ 可通过新参数 <parameter>filter</parameter> 来过滤 <methodname>ReflectionClass::getConstants</methodname> 和
+ <methodname>ReflectionClass::getReflectionConstants</methodname> 的返回结果。
+ 新增三个常量,搭配使用:
</para>
<para>
<simplelist>
@@ -45,9 +45,9 @@
<itemizedlist>
<listitem>
<para>
- The <methodname>ZipArchive::addGlob</methodname> and
- <methodname>ZipArchive::addPattern</methodname> methods accept more values in the
- <parameter>options</parameter> array argument:
+ <methodname>ZipArchive::addGlob</methodname> 和
+ <methodname>ZipArchive::addPattern</methodname> 方法中
+ <parameter>options</parameter> 数组参数可接受更多的值:
</para>
<para>
<simplelist>
@@ -61,16 +61,18 @@
</listitem>
<listitem>
<para>
- <methodname>ZipArchive::addEmptyDir</methodname>, <methodname>ZipArchive::addFile</methodname>
- and <methodname>ZipArchive::addFromString</methodname>
- methods have a new <parameter>flags</parameter> argument. This allows managing name encoding
- (<constant>ZipArchive::FL_ENC_*</constant>) and entry replacement
- (<constant>ZipArchive::FL_OVERWRITE</constant>).
+ <methodname>ZipArchive::addEmptyDir</methodname>、<methodname>ZipArchive::addFile</methodname>、
+ <methodname>ZipArchive::addFromString</methodname>
+ 方法新增 <parameter>flags</parameter> 参数。
+
+ 可用于名称编码
+ (<constant>ZipArchive::FL_ENC_*</constant>) 与条目(entry)替换
+ (<constant>ZipArchive::FL_OVERWRITE</constant>)。
</para>
</listitem>
<listitem>
<para>
- <methodname>ZipArchive::extractTo</methodname> now restores the file modification time.
+ <methodname>ZipArchive::extractTo</methodname> 现在会储存文件的修改时间。
</para>
</listitem>
</itemizedlist>
@@ -78,7 +80,7 @@
</sect2>
<sect2 xml:id="migration80.other-changes.extensions">
- <title>Other Changes to Extensions</title>
+ <title>其他扩展变更</title>
<sect3 xml:id="migration80.other-changes.extensions.curl">
<title>CURL</title>
@@ -86,13 +88,12 @@
<itemizedlist>
<listitem>
<para>
- The CURL extension now requires at least libcurl 7.29.0.
+ 现在 CURL 扩展要求 libcurl 版本至少为 7.29.0。
</para>
</listitem>
<listitem>
<para>
- The deprecated parameter <parameter>version</parameter> of <function>curl_version</function> has
- been removed.
+ 移除了 <function>curl_version</function> 废弃的参数 <parameter>version</parameter>。
</para>
</listitem>
</itemizedlist>
@@ -99,11 +100,11 @@
</sect3>
<sect3 xml:id="migration80.other-changes.extensions.date">
- <title>Date and Time</title>
+ <title>日期/时间</title>
<para>
- <classname>DatePeriod</classname> now implements <interfacename>IteratorAggregate</interfacename>
- (instead of <interfacename>Traversable</interfacename>).
+ 现在 <classname>DatePeriod</classname> 实现(implements)了 <interfacename>IteratorAggregate</interfacename>
+ (之前是 <interfacename>Traversable</interfacename>)。
</para>
</sect3>
@@ -111,18 +112,18 @@
<title>DOM</title>
<para>
- <classname>DOMNamedNodeMap</classname> and <classname>DOMNodeList</classname> now implement
- <interfacename>IteratorAggregate</interfacename> (instead of
- <interfacename>Traversable</interfacename>).
+ 现在 <classname>DOMNamedNodeMap</classname> 与 <classname>DOMNodeList</classname> 实现(implements)了
+ <interfacename>IteratorAggregate</interfacename> (之前是
+ <interfacename>Traversable</interfacename>)。
</para>
</sect3>
<sect3 xml:id="migration80.other-changes.extensions.intl">
- <title>Intl</title>
+ <title>国际化</title>
<para>
- <classname>IntlBreakIterator</classname> and <classname>ResourceBundle</classname> now implement
- <interfacename>IteratorAggregate</interfacename> (instead of <interfacename>Traversable</interfacename>).
+ 现在 <classname>IntlBreakIterator</classname> 与 <classname>ResourceBundle</classname> 实现(implements)了
+ <interfacename>IteratorAggregate</interfacename> (之前是 <interfacename>Traversable</interfacename>)。
</para>
</sect3>
@@ -130,8 +131,8 @@
<title>Enchant</title>
<para>
- The enchant extension now uses libenchant-2 by default when available. libenchant version 1 is
- still supported but is deprecated and could be removed in the future.
+ 现在环境允许时,enchant 会默认使用 libenchant-2。
+ 仍然支持 libenchant 1,但已经废弃,并将在未来移除。
</para>
</sect3>
@@ -141,16 +142,16 @@
<itemizedlist>
<listitem>
<para>
- The <parameter>num_points</parameter> parameter of <function>imagepolygon</function>,
- <function>imageopenpolygon</function> and <function>imagefilledpolygon</function> is now
- optional, i.e. these functions may be called with either 3 or 4 arguments. If the argument is
- omitted, it is calculated as <code>count($points)/2</code>.
+ <function>imagepolygon</function>、
+ <function>imageopenpolygon</function>、<function>imagefilledpolygon</function>
+ 的参数 <parameter>num_points</parameter> 现在为可选参数。
+ 这些函数可用三或四个参数去调用。
+ 省略参数时,会按 <code>count($points)/2</code> 计算。
</para>
</listitem>
<listitem>
<para>
- The function <function>imagegetinterpolation</function> to get the current interpolation method
- has been added.
+ 新增函数 <function>imagegetinterpolation</function>,可获取当前的插值(interpolation)。
</para>
</listitem>
</itemizedlist>
@@ -160,8 +161,7 @@
<title>JSON</title>
<para>
- The JSON extension cannot be disabled anymore and is always an integral part of any PHP build,
- similar to the date extension.
+ 现在无法禁用 JSON 扩展,将是任意 PHP 版本的内置功能,类似 date 扩展。
</para>
</sect3>
@@ -169,7 +169,7 @@
<title>MBString</title>
<para>
- The Unicode data tables have been updated to version 13.0.0.
+ 更新 Unicode 数据表版本到 13.0.0。
</para>
</sect3>
@@ -177,9 +177,9 @@
<title>PDO</title>
<para>
- <classname>PDOStatement</classname> now implements
- <interfacename>IteratorAggregate</interfacename> (instead of
- <interfacename>Traversable</interfacename>).
+ 现在 <classname>PDOStatement</classname> 实现(implements)了
+ <interfacename>IteratorAggregate</interfacename> (之前是
+ <interfacename>Traversable</interfacename>)。
</para>
</sect3>
@@ -187,9 +187,9 @@
<title>LibXML</title>
<para>
- The minimum required libxml version is now 2.9.0. This means that external entity loading is now
- guaranteed to be disabled by default, and no extra steps need to be taken to protect against XXE
- attacks.
+ 现在要求 libxml 最小版本为 2.9.0。
+ 这代表着确保了默认情况下禁用了外部实体加载(external entity loading)的功能。
+ 无需额外步骤即可防范 XML 外部实体注入攻击(XXE attacks)。
</para>
</sect3>
@@ -199,15 +199,15 @@
<itemizedlist>
<listitem>
<para>
- When mysqlnd is not used (which is the default and recommended option), the minimum supported
- libmysqlclient version is now 5.5.
+ 未使用 mysqlnd 时(也是默认且推荐的做法),
+ 支持的最小 libmysqlclient 版本为 5.5。
</para>
</listitem>
<listitem>
<para>
- <classname>mysqli_result</classname> now implements
- <interfacename>IteratorAggregate</interfacename> (instead of
- <interfacename>Traversable</interfacename>).
+ 现在 <classname>mysqli_result</classname> 实现(implements)了
+ <interfacename>IteratorAggregate</interfacename> (之前是
+ <interfacename>Traversable</interfacename>)。
</para>
</listitem>
</itemizedlist>
@@ -217,7 +217,7 @@
<title>PGSQL / PDO PGSQL</title>
<para>
- The PGSQL and PDO PGSQL extensions now require at least libpq 9.1.
+ PGSQL 与 PDO PGSQL 扩展需要 libpq 的版本号至少为 9.1。
</para>
</sect3>
@@ -225,11 +225,11 @@
<title>Readline</title>
<para>
- Calling <function>readline_completion_function</function> before the interactive prompt starts
- (e.g. in <link linkend="ini.auto-prepend-file">auto_prepend_file</link>) will now override the
- default interactive prompt completion function. Previously,
- <function>readline_completion_function</function> only worked when called after starting the
- interactive prompt.
+ 在交互提示开始之前调用 <function>readline_completion_function</function>
+ (例如在 <link linkend="ini.auto-prepend-file">auto_prepend_file</link> 中),
+ 将重写默认的交互输入补全函数。
+ 之前,只有交互提示(interactive prompt)开始后,
+ <function>readline_completion_function</function> 才会运行。
</para>
</sect3>
@@ -237,30 +237,29 @@
<title>SimpleXML</title>
<para>
- <classname>SimpleXMLElement</classname> now implements
- <interfacename>RecursiveIterator</interfacename> and absorbed the functionality of
- <classname>SimpleXMLIterator</classname>. <classname>SimpleXMLIterator</classname> is an empty
- extension of <classname>SimpleXMLElement</classname>.
+ 现在 <classname>SimpleXMLElement</classname> 实现(implements)了
+ <interfacename>RecursiveIterator</interfacename> 并吸收了
+ <classname>SimpleXMLIterator</classname> 的功能。
+ <classname>SimpleXMLIterator</classname> 是
+ <classname>SimpleXMLElement</classname> 的一个空扩展。
</para>
</sect3>
</sect2>
<sect2 xml:id="migration80.other-changes.ini">
- <title>Changes to INI File Handling</title>
+ <title>INI 文件处理的变更</title>
<itemizedlist>
<listitem>
<para>
<!--<link linkend="ini.com.dotnet-version">-->com.dotnet_version<!--</link>-->
- is a new INI directive to choose the version of the .NET framework to use for
- <classname>dotnet</classname> objects.
+ 是一个新的 INI 指令,用于选择 <classname>dotnet</classname> 对象的 .NET framework 版本。
</para>
</listitem>
<listitem>
<para>
<!--<link linkend="ini.zend.exception-string-param-max-len">-->zend.exception_string_param_max_len<!--</link>-->
- is a new INI directive to set the maximum string length in an argument of a stringified
- stack strace.
+ 是一个新的 INI 指令,用于设置字符串化的调用栈(stack strace)的最大字符串长度。
</para>
</listitem>
</itemizedlist>
@@ -270,32 +269,31 @@
<title>EBCDIC</title>
<para>
- EBCDIC targets are no longer supported, though it's unlikely that they were still working in the
- first place.
+ 不再支持 EBCDIC targets,虽然它不太可能还在当初的地方继续运行。
</para>
</sect2>
<sect2 xml:id="migration80.other-changes.performance">
- <title>Performance</title>
+ <title>性能</title>
<itemizedlist>
<listitem>
<para>
- A Just-In-Time (JIT) compiler has been added to the opcache extension.
+ opcache 扩展新增了即时编译(JIT) 支持。
<!-- https://wiki.php.net/rfc/jit -->
</para>
</listitem>
<listitem>
<para>
- <function>array_slice</function> on an array without gaps will no longer scan the whole array
- to find the start offset. This may significantly reduce the runtime of the function with large
- offsets and small lengths.
+ <function>array_slice</function> 用于没有空隙的数组时,
+ 将不会扫描整个数组去查找开始的位移(offset)。
+ 在 offset 较大、长度较小时,会显著减少函数的运行时间。
</para>
</listitem>
<listitem>
<para>
- <function>strtolower</function> now uses a SIMD implementation when using the
- <literal>"C"</literal> <constant>LC_CTYPE</constant> locale (which is the default).
+ 当本地化 <constant>LC_CTYPE</constant> 为 <literal>"C"</literal> 时(也是默认值),
+ <function>strtolower</function> 会使用 SIMD 的实现。
</para>
</listitem>
</itemizedlist>