Skip to content

Commit d78027c

Browse files
committed
Update language
1 parent 25c0026 commit d78027c

File tree

7 files changed

+148
-113
lines changed

7 files changed

+148
-113
lines changed

appendices/tokens.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision:8a6397d39aefd23c61d64aa4e9af919772541e2a Maintainer: haohappy Status: ready -->
3+
<!-- EN-Revision:9418ae19ae6ab1d3f1536db986830362b207b1d6 Maintainer: haohappy Status: ready -->
44
<!-- CREDITS: class007, mowangjuanzi, Luffy -->
55
<appendix xml:id="tokens" xmlns="http://docbook.org/ns/docbook">
66
<title>解析器记号(token)列表</title>
@@ -695,6 +695,13 @@ defined('T_FN') || define('T_FN', 10001);
695695
属性挂钩(自 PHP 8.4.0 起可用)
696696
</entry>
697697
</row>
698+
<row xml:id="constant.t-property-c">
699+
<entry><constant>T_PROPERTY_C</constant></entry>
700+
<entry>__PROPERTY__</entry>
701+
<entry>
702+
<link linkend="language.constants.predefined">魔术常量</link>
703+
</entry>
704+
</row>
698705
<row xml:id="constant.t-protected">
699706
<entry><constant>T_PROTECTED</constant></entry>
700707
<entry>protected</entry>

language/constants.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: f9dabdea3f92ea77cf5077020a3e945951fdc9db Maintainer: Avenger Status: ready -->
3+
<!-- EN-Revision: 9418ae19ae6ab1d3f1536db986830362b207b1d6 Maintainer: Avenger Status: ready -->
44
<!-- CREDITS: Altair, Luffy, mowangjuanzi -->
55
<chapter xml:id="language.constants" xmlns="http://docbook.org/ns/docbook">
66
<title>常量</title>
@@ -218,8 +218,8 @@ echo ANIMALS[1]; // 将输出 "cat"
218218
<sect1 xml:id="language.constants.magic">
219219
<title>魔术常量</title>
220220
<para>
221-
有九个魔术常量它们的值随着它们在代码中的位置改变而改变。例如
222-
<constant>__LINE__</constant> 的值就依赖于它在脚本中所处的行来决定。这些特殊的常量不区分大小写,如下:
221+
一些魔术常量会根据使用位置而变化。例如 <constant>__LINE__</constant>
222+
的值取决于它在脚本中使用的行。所有这些“魔术”常量都在编译时解析,而常规常量则在运行时解析。这些特殊的常量不区分大小写,如下:
223223
</para>
224224
<para>
225225
<table>
@@ -261,7 +261,7 @@ echo ANIMALS[1]; // 将输出 "cat"
261261
<entry><constant>__CLASS__</constant></entry>
262262
<entry>
263263
当前类的名称。类名包括其被声明的作用域(例如
264-
<literal>Foo\Bar</literal>)。当用在 trait 方法中时,__CLASS__
264+
<literal>Foo\Bar</literal>)。当用在 trait 方法中时,<constant>__CLASS__</constant>
265265
是调用 trait 方法的类的名字。
266266
</entry>
267267
</row>

language/control-structures/match.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 6c71b05df89358d7760a4740ed3fcfa1682eadb6 Maintainer: mowangjuanzi Status: ready -->
4-
<!-- CREDITS: Luffy -->
3+
<!-- EN-Revision: 6507fc94c2d0a0e65ee9486a98e9135f34220ae7 Maintainer: mowangjuanzi Status: ready -->
4+
<!-- CREDITS: Luffy, mowangjuanzi -->
55
<sect1 xml:id="control-structures.match" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
66
<title>match</title>
77
<?phpdoc print-version-for="match"?>
@@ -64,8 +64,8 @@ $output = match (true) {
6464
$age < 2 => "Baby",
6565
$age < 13 => "Child",
6666
$age <= 19 => "Teenager",
67+
$age >= 40 => "Old adult",
6768
$age > 19 => "Young adult",
68-
$age >= 40 => "Old adult"
6969
};
7070
7171
var_dump($output);

language/errors/php7.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 1f7a0e4af85d1b74595626afa1ca774c896e8388 Maintainer: FishDrowned Status: ready -->
4-
<!-- Reviewed: no -->
5-
3+
<!-- EN-Revision: 4bf789e981af0836c41daa16e57ef86c21497faa Maintainer: FishDrowned Status: ready -->
4+
<!-- CREDITS: mowangjuanzi -->
65
<sect1 xml:id="language.errors.php7" xmlns="http://docbook.org/ns/docbook">
76
<title>PHP 7 错误处理</title>
87

@@ -74,6 +73,9 @@
7473
<listitem>
7574
<simpara><classname>FiberError</classname></simpara>
7675
</listitem>
76+
<listitem>
77+
<simpara><classname>RequestParseBodyException</classname></simpara>
78+
</listitem>
7779
</itemizedlist>
7880
</listitem>
7981
<listitem>

0 commit comments

Comments
 (0)