Skip to content

Commit

Permalink
Sync outdated files
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Oct 11, 2024
1 parent d10b1dd commit 07661f9
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 60 deletions.
6 changes: 3 additions & 3 deletions features/gc.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9957fc259b7b920269ead2a0180969db5bf13433 Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 23e84882d6654f995166d17e5610af6bf00ef18c Maintainer: mowangjuanzi Status: ready -->
<!-- CREDITS: Luffy -->
<chapter xml:id="features.gc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>垃圾回收</title>
Expand Down Expand Up @@ -220,7 +220,7 @@ a: (refcount=1, is_ref=0)=array (
</para>
<para>
<example>
<title>将数组本身作为其自身的一个元素添加进去</title>
<title>将数组添加为自身的一个元素</title>
<programlisting role="php">
<![CDATA[
<?php
Expand Down Expand Up @@ -283,7 +283,7 @@ a: (refcount=2, is_ref=1)=array (
<para>
虽然在任何作用域中都没有指向这个结构的符号,却无法清理它,因为数组元素“1”仍然指向同一个数组。由于没有外部符号指向它,用户无法清理该结构;因此会出现内存泄漏。幸运的是,PHP
会在请求结束时清理这个数据结构,但在此之前,它会占用宝贵的内存空间。如果你正在实现解析算法或其他需要子级元素指向"父级"元素的情况,会经常发生。当然,object
也可能出现相同的情况,因为 object 始终隐式引用
也可能出现相同的情况,因为 object 始终隐式“<link linkend="language.oop5.references">引用</link>”
</para>
<para>
如果这种情况只发生一两次,可能不是问题,但如果出现数千次,甚至数百万次的内存损失,显然就成了问题。这在长时间运行的脚本中尤为棘手,比如守护进程,其中请求基本上永远不会结束,或者在大量的单元测试集中。后者在运行
Expand Down
10 changes: 4 additions & 6 deletions install/cloud/azure.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 5d591c30aeef70c8cd325ab914c102333cc9bd8f Maintainer: mowangjuanzi Status: ready -->

<sect1 xml:id="install.cloud.azure" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- EN-Revision: 2dbf3d9064d4cb07f0a2f7d06641c877a2e5ed24 Maintainer: mowangjuanzi Status: ready -->
<!-- CREDITS: Luffy -->
<sect1 xml:id="install.cloud.azure" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Azure 应用服务</title>
<para>
PHP 经常用于 Azure 应用服务(又称 Microsoft Azure、Windows Azure、Azure Web 应用)。
Expand All @@ -15,8 +15,6 @@

<para>因此,PHP 和扩展将跟在其他 Windows 服务器一样在 Azure 应用服务上运行。

大部分的知识库也适用,因此也可以参阅 <link linkend="install.windows.troubleshooting">Windows 疑难解答页面</link>。

然而,Azure 应用管理的管理界面是不同的:
</para>

Expand Down Expand Up @@ -54,7 +52,7 @@
</para>
</sect2>

</sect1>
</sect1>

<!-- Keep this comment at the end of the file
Local variables:
Expand Down
12 changes: 4 additions & 8 deletions install/windows/building.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 53afbdaf791ddbc4455672122573644f3f0d7949 Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: 2dbf3d9064d4cb07f0a2f7d06641c877a2e5ed24 Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: Luffy -->
<sect1 xml:id="install.windows.building" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>从源程序编译</title>
<para>
本章讲述了在 Windows 下如何使用 Microsoft 的工具编译 PHP。要在
CygWin 中编译 PHP,请参考 <xref linkend="install.unix"/> 一章。
</para>
<para>
具体内容见:<link xlink:href="&url.wiki.windows.build.howto;">&url.wiki.windows.build.howto;</link>。
</para>
<simpara>
参阅 <link xlink:href="&url.install.windows.stepbystep;">逐步构建说明</link> 以使用 Visual Studio 进行编译。
</simpara>
</sect1>

<!-- Keep this comment at the end of the file
Expand Down
6 changes: 3 additions & 3 deletions language-snippets.ent
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 4cb53ecbd763db2db808e90d7eda63afb380e6df Maintainer: Gregory Status: ready -->
<!-- EN-Revision: 27aaf9a626b5711866a2e6957f568e3c31143760 Maintainer: Gregory Status: ready -->
<!-- CREDITS: dallas, mowangjuanzi, Luffy -->
<!-- 请保持此文件与英文文件中相应的每个 ENTITY 行号一一对应以便于对照,修改与更新! -->

Expand Down Expand Up @@ -3521,7 +3521,7 @@ local: {
<row>
<entry>sparsity</entry>
<entry><type>int</type></entry>
<entry>Required. Positive 64-bit integer.</entry>
<entry>Optional. Positive 64-bit integer.</entry>
</row>
<row>
<entry>precision</entry>
Expand All @@ -3535,7 +3535,7 @@ local: {
<row>
<entry>trimFactor</entry>
<entry><type>int</type></entry>
<entry>Required. Positive 32-bit integer.</entry>
<entry>Optional. Positive 32-bit integer.</entry>
</row>
</tbody>
</tgroup>
Expand Down
30 changes: 15 additions & 15 deletions language/control-structures/declare.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 28529d3539b850e870e3aa97570f4db0e53daa03 Maintainer: dallas Status: ready -->
<!-- EN-Revision: 5499acf9df7e1338d540bde207acc859792cd139 Maintainer: dallas Status: ready -->
<!-- CREDITS: Luffy -->
<sect1 xml:id="control-structures.declare" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>declare</title>
Expand All @@ -19,20 +19,20 @@ declare (directive)
</para>
<para>
<literal>directive</literal> 部分允许设定 <literal>declare</literal>
代码段的行为。目前只认识三个指令:<literal>ticks</literal>(更多信息见下面
<link linkend="control-structures.declare.ticks">ticks</link> 指令)、
<literal>encoding</literal>(更多信息见下面 <link
linkend="control-structures.declare.encoding">encoding</link> 指令)、
<literal>strict_types</literal> 指令 (更多信息见类型声明页面
<link linkend="language.types.declarations.strict">严格类型</link>
章节)。
代码段的行为。
目前只认识三个指令:
<simplelist>
<member><link linkend="control-structures.declare.ticks"><literal>ticks</literal></link></member>
<member><link linkend="control-structures.declare.encoding"><literal>encoding</literal></link></member>
<member><link linkend="language.types.declarations.strict"><literal>strict_types</literal></link></member>
</simplelist>
</para>
<para>
因为本指令是在文件编译时处理的,所以指令只接受字面量的值。
无法使用变量和常量。下面为你演示:
<informalexample>
<programlisting role="php">
<![CDATA[
因为本指令是在文件编译时处理的,所以指令只接受字面量的值。
无法使用变量和常量。下面为你演示:
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
// 这样是有效的:
declare(ticks=1);
Expand All @@ -42,8 +42,8 @@ const TICK_VALUE = 1;
declare(ticks=TICK_VALUE);
?>
]]>
</programlisting>
</informalexample>
</programlisting>
</informalexample>
</para>
<para>
<literal>declare</literal> 代码段中的 <literal>statement</literal>
Expand Down
12 changes: 5 additions & 7 deletions language/control-structures/include-once.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- $Author$ -->
<!-- Reviewed: yes Maintainer: dallas -->
<!-- EN-Revision: af6fdf16ab44bcf4d045407963e43c3d9dd2ff29 Maintainer: dallas Status: ready -->

<!-- EN-Revision: 89d80c92a1154a2903fff371f0d056bf2ac8ba27 Maintainer: dallas Status: ready -->
<!-- CREDITS: Luffy -->
<sect1 xml:id="function.include-once" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>include_once</title>
<?phpdoc print-version-for="include_once"?>
<para>
<literal>include_once</literal> 语句在脚本执行期间包含并运行指定文件。此行为和
<function>include</function>
语句类似,唯一区别是如果该文件中已经被包含过,则不会再次包含,且 include_once 会返回 &true;
<literal>include_once</literal> 表达在脚本执行期间包含并运行指定文件。此行为和
<function>include</function> 表达类似,
唯一区别是如果该文件中已经被包含过,则不会再次包含,且 include_once 会返回 &true;
顾名思义,require_once,文件仅仅包含(require)一次。
</para>
<para>
Expand Down
2 changes: 1 addition & 1 deletion language/enumerations.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 0f53e8f37b7bf8513c93e5e2d67e7787f26ed693 Maintainer: daijie Status: ready -->
<!-- EN-Revision: 83e2056f071742c44d2b0bdbc8574d73697c7a08 Maintainer: daijie Status: ready -->
<!-- CREDITS: Luffy, mowangjuanzi -->
<chapter xml:id="language.enumerations" xmlns="http://docbook.org/ns/docbook">
<title>枚举</title>
Expand Down
4 changes: 2 additions & 2 deletions language/functions.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: f94d903985119d3ac00f4528551df947f57b667f Maintainer: avenger Status: ready -->
<!-- EN-Revision: 74976cdb263ef841c5fc2c3f91ca7e284adce552 Maintainer: avenger Status: ready -->
<!-- CREDITS: Gregory, dallas, Luffy, mowangjuanzi -->
<chapter xml:id="language.functions" xmlns="http://docbook.org/ns/docbook">
<title>函数</title>
Expand Down Expand Up @@ -1397,7 +1397,7 @@ var_export($fn(5)(10));
<?php
fn(array $x) => $x;
static fn(): int => $x;
static fn($x): int => $x;
fn($x = 42) => $x;
fn(&$x) => $x;
fn&($x) => $x;
Expand Down
2 changes: 1 addition & 1 deletion language/operators/comparison.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 8859c8b96cd9e80652813f7bcf561432a5e9f934 Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: e50e79746736dbdfbabe9bd3566793b3ddf38f58 Maintainer: mowangjuanzi Status: ready -->
<!-- CREDITS: Luffy -->
<sect1 xml:id="language.operators.comparison">
<title>比较运算符</title>
Expand Down
3 changes: 2 additions & 1 deletion language/wrappers/php.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: bad50150f7e06228f48c4461fab52afe08a4d5e4 Maintainer: daijie Status: ready -->
<!-- EN-Revision: 0592e6316d3869b49637df29c471097e7bf78592 Maintainer: daijie Status: ready -->
<!-- CREDITS: Luffy, mowangjuanzi -->
<refentry xml:id="wrappers.php" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false" role="stream_wrapper">
<refnamediv>
Expand Down Expand Up @@ -332,6 +332,7 @@ file_put_contents("php://filter/write=string.rot13/resource=example.txt","Hello
</para>
<programlisting role="php">
<![CDATA[
<?php
file_put_contents('php://memory', 'PHP');
echo file_get_contents('php://memory'); // 啥也没有
]]>
Expand Down
6 changes: 3 additions & 3 deletions reference/array/functions/range.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 62421b98a97fe576987878055e17cf755eb395af Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 647d5c50e3b6c103a3efdb578fd227f8b923399d Maintainer: daijie Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.range" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>range</refname>
Expand Down Expand Up @@ -115,7 +115,7 @@
</listitem>
<listitem>
<simpara>
如果 <parameter>start</parameter> 或 <parameter>end</parameter> 不是<link
如果 <parameter>start</parameter> 或 <parameter>end</parameter> 不是一个<link
linkend="language.types.numeric-strings">数字字符串</link>,并且多于一个字节,将发出 <constant>E_WARNING</constant>。
</simpara>
</listitem>
Expand Down
6 changes: 5 additions & 1 deletion reference/datetime/datetimeinterface/diff.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 81908751c5787d433937a548235ca45fe3256841 Maintainer: mowangjuanzi Status: ready -->
<!-- EN-Revision: 52222422c00aba192c5f7fed3c4efdaa870e799e Maintainer: mowangjuanzi Status: ready -->
<!-- CREDITS: Luffy -->
<refentry xml:id="datetime.diff" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -68,6 +68,10 @@
<para>
<classname>DateInterval</classname> 对象表示两个日期之间的差值。
</para>
<para>
<parameter>absolute</parameter> 参数只影响 <classname>DateInterval</classname> 对象的
<parameter>invert</parameter> 属性。
</para>
<para>
返回更具体的表示应用于原始对象(<parameter>$this</parameter> 或
<parameter>$originObject</parameter>)到达 <parameter>$targetObject</parameter>
Expand Down
8 changes: 1 addition & 7 deletions reference/exif/setup.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 48ce43fe79fa0c9f31f187ea8ec995b4cb13037e Maintainer: yuanyuqiang Status: ready -->
<!-- EN-Revision: c0af8c90a6b83faaadaebdfd22970bcb8b9c4057 Maintainer: yuanyuqiang Status: ready -->
<!-- CREDITS: Luffy -->

<chapter xml:id="exif.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
Expand All @@ -16,12 +16,6 @@
<link linkend="ref.mbstring">mbstring</link> 扩展。
exif 不需要其他额外的 PHP 库就可以直接使用。
</para>
<para>
Windows 平台:必须启用
<link linkend="ref.mbstring"> mbstring</link> 扩展。
并且,在 <filename>php.ini</filename> 文件中,
<link linkend="ref.mbstring">mbstring</link> 必须先于 EXIF 加载。
</para>
</section>
<!-- }}} -->

Expand Down
4 changes: 2 additions & 2 deletions reference/ftp/functions/ftp-nb-fget.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 4d1c34c9b7a30cfc3a59641122c707a2812cfed7 Maintainer: yuanyuqiang Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 21840cc5931a3d97534a17204d621471348fa4cb Maintainer: yuanyuqiang Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.ftp-nb-fget" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ftp_nb_fget</refname>
Expand Down

0 comments on commit 07661f9

Please sign in to comment.