svn: /phpdoc/zh/trunk/language/ control-structures/elseif.xml control-structures/goto.xml control-structures/include.xml errors/php7.xml
[email protected] (George Peter Banyard) Sat, 22 Jun 2019 00:14:19 +0000
| Newsgroups | php.doc.zh |
|---|---|
| Message-ID | <[email protected]> |
girgias Sat, 22 Jun 2019 00:14:19 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=347630
Log:
Minor updates to Chinese translation to sync with latest English revision.
Changed paths:
U phpdoc/zh/trunk/language/control-structures/elseif.xml
U phpdoc/zh/trunk/language/control-structures/goto.xml
U phpdoc/zh/trunk/language/control-structures/include.xml
U phpdoc/zh/trunk/language/errors/php7.xml
Modified: phpdoc/zh/trunk/language/control-structures/elseif.xml
===================================================================
--- phpdoc/zh/trunk/language/control-structures/elseif.xml 2019-06-22 00:00:07 UTC (rev 347629)
+++ phpdoc/zh/trunk/language/control-structures/elseif.xml 2019-06-22 00:14:19 UTC (rev 347630)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- $Author$ -->
-<!-- EN-Revision: 312947 Maintainer: dallas Status: ready -->
+<!-- EN-Revision: 341918 Maintainer: dallas Status: ready -->
<sect1 xml:id="control-structures.elseif" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title><literal>elseif</literal>/<literal>else if</literal></title>
@@ -61,17 +61,17 @@
<?php
/* 不正确的使用方法: */
-if($a > $b):
+if ($a > $b):
echo $a." is greater than ".$b;
-else if($a == $b): // 将无法编译
+else if ($a == $b): // 将无法编译
echo "The above line causes a parse error.";
endif;
/* 正确的使用方法: */
-if($a > $b):
+if ($a > $b):
echo $a." is greater than ".$b;
-elseif($a == $b): // 注意使用了一个单词的 elseif
+elseif ($a == $b): // 注意使用了一个单词的 elseif
echo $a." equals ".$b;
else:
echo $a." is neither greater than or equal to ".$b;
Modified: phpdoc/zh/trunk/language/control-structures/goto.xml
===================================================================
--- phpdoc/zh/trunk/language/control-structures/goto.xml 2019-06-22 00:00:07 UTC (rev 347629)
+++ phpdoc/zh/trunk/language/control-structures/goto.xml 2019-06-22 00:14:19 UTC (rev 347630)
@@ -1,12 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- $Author$ -->
-<!-- EN-Revision: 312947 Maintainer: HaoHappy Status: ready -->
+<!-- EN-Revision: 332237 Maintainer: HaoHappy Status: ready -->
<sect1 xml:id="control-structures.goto" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title><literal>goto</literal></title>
<?phpdoc print-version-for="goto"?>
<para>
+ <mediaobject>
+ <alt>What's the worse thing that could happen if you use goto?</alt>
+ <imageobject>
+ <imagedata fileref="en/language/figures/xkcd-goto.png" format="PNG"/>
+ </imageobject>
+ </mediaobject>
+ 此漫画鸣谢 <link xlink:href="&url.xkcd;292">xkcd</link>
+ </para>
+ <para>
<literal>goto</literal>
操作符可以用来跳转到程序中的另一位置。该目标位置可以用目标名称加上冒号来标记,而跳转指令是
<literal>goto</literal> 之后接上目标位置的标记。PHP 中的 <literal>goto</literal>
@@ -91,14 +100,6 @@
<literal>goto</literal> 操作符仅在 PHP 5.3及以上版本有效。
</para>
</note>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="en/language/figures/xkcd-goto.png" format="PNG"/>
- </imageobject>
- </mediaobject>
- 此漫画鸣谢 <link xlink:href="&url.xkcd;292">xkcd</link>
- </para>
</sect1>
<!-- Keep this comment at the end of the file
Modified: phpdoc/zh/trunk/language/control-structures/include.xml
===================================================================
--- phpdoc/zh/trunk/language/control-structures/include.xml 2019-06-22 00:00:07 UTC (rev 347629)
+++ phpdoc/zh/trunk/language/control-structures/include.xml 2019-06-22 00:14:19 UTC (rev 347630)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- $Author$ -->
-<!-- Reviewed: yes Maintainer: dallas -->
-<!-- EN-Revision: 327096 Maintainer: dallas Status: ready -->
+<!-- Reviewed: no Maintainer: dallas -->
+<!-- EN-Revision: 337282 Maintainer: dallas Status: ready -->
<sect1 xml:id="function.include" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title><function>include</function></title>
@@ -19,9 +19,9 @@
<link linkend="ini.include-path">include_path</link> 下没找到该文件则
<literal>include</literal> 最后才在调用脚本文件所在的目录和当前工作目录下寻找。如果最后仍未找到文件则
<literal>include</literal> 结构会发出一条<link
- linkend="errorfunc.constants.errorlevels">警告</link>;这一点和
+ linkend="errorfunc.constants.errorlevels.e-warning">警告</link>;这一点和
<function>require</function> 不同,后者会发出一个<link
- linkend="errorfunc.constants.errorlevels">致命错误</link>。
+ linkend="errorfunc.constants.errorlevels.e-error">致命错误</link>。
</simpara>
<simpara>
如果定义了路径——不管是绝对路径(在 Windows
@@ -106,13 +106,12 @@
linkend="language.basic-syntax.phpmode">有效的 PHP 起始和结束标记</link>之中。
</simpara>
<simpara>
- 如果“<link linkend="ini.allow-url-fopen">URL fopen wrappers</link>”在
- PHP 中被激活(默认配置),可以用 URL(通过 HTTP
+ 如果“<link linkend="ini.allow-url-include">URL include wrappers</link>”在
+ PHP 中被激活,可以用 URL(通过 HTTP
或者其它支持的封装协议——见<xref linkend="wrappers"/>)而不是本地文件来指定要被包含的文件。如果目标服务器将目标文件作为
PHP 代码解释,则可以用适用于 HTTP GET 的 URL
请求字符串来向被包括的文件传递变量。严格的说这和包含一个文件并继承父文件的变量空间并不是一回事;该脚本文件实际上已经在远程服务器上运行了,而本地脚本则包括了其结果。
</simpara>
- &warn.no-win32-fopen-wrapper;
<para>
<example>
<title>通过 HTTP 进行的 <literal>include</literal></title>
@@ -175,13 +174,13 @@
<programlisting role="php">
<![CDATA[
<?php
-// won't work, evaluated as include(('vars.php') == 'OK'), i.e. include('')
-if (include('vars.php') == 'OK') {
+// won't work, evaluated as include(('vars.php') == TRUE), i.e. include('')
+if (include('vars.php') == TRUE) {
echo 'OK';
}
// works
-if ((include 'vars.php') == 'OK') {
+if ((include 'vars.php') == TRUE) {
echo 'OK';
}
?>
Modified: phpdoc/zh/trunk/language/errors/php7.xml
===================================================================
--- phpdoc/zh/trunk/language/errors/php7.xml 2019-06-22 00:00:07 UTC (rev 347629)
+++ phpdoc/zh/trunk/language/errors/php7.xml 2019-06-22 00:14:19 UTC (rev 347630)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 338227 Maintainer: FishDrowned Status: ready -->
+<!-- EN-Revision: 345757 Maintainer: FishDrowned Status: ready -->
<!-- Reviewed: no -->
<sect1 xml:id="language.errors.php7" xmlns="http://docbook.org/ns/docbook">
@@ -50,10 +50,20 @@
<simpara><classname>AssertionError</classname></simpara>
</listitem>
<listitem>
- <simpara><classname>ParseError</classname></simpara>
+ <simpara><classname>CompileError</classname></simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara><classname>ParseError</classname></simpara>
+ </listitem>
+ </itemizedlist>
</listitem>
<listitem>
<simpara><classname>TypeError</classname></simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara><classname>ArgumentCountError</classname></simpara>
+ </listitem>
+ </itemizedlist>
</listitem>
</itemizedlist>
</listitem>