Skip to content

Commit c09010f

Browse files
authored
Sync bc functions (#965)
1 parent afd2804 commit c09010f

File tree

6 files changed

+122
-40
lines changed

6 files changed

+122
-40
lines changed

language-defs.ent

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: 5097918a78b2d1de0839a48bd30912d498ac5850 Maintainer: yincheng Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
3+
<!-- EN-Revision: a6621a4baf56fd78a842dfd684f5c981991bddcd Maintainer: yincheng Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<!-- Part titles used mostly in manual.xml itself -->
66
<!ENTITY PHPManual "PHP 手册">
77
<!ENTITY Seealso "参见">
@@ -45,7 +45,7 @@
4545
<!ENTITY UIExtensions "图形用户界面(GUI) 扩展">
4646
<!ENTITY Appendices "附录">
4747
<!ENTITY PEAR "PEAR:PHP 扩展与应用资源库">
48-
<!ENTITY FAQ "FAQ:常见问题">
48+
<!ENTITY FAQ "常见问题">
4949
<!ENTITY FAQabbrev "FAQ">
5050
<!ENTITY Internals "PHP 和 Zend 引擎内部资料">
5151
<!ENTITY Internals2 "PHP 核心:骇客指南">

language-snippets.ent

Lines changed: 89 additions & 16 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: ffd2ef754b37526c0b96e94859d57ce06acfbf41 Maintainer: Gregory Status: ready -->
3+
<!-- EN-Revision: cb573d7f33644962dcf32003e5898cf4d67be6ac Maintainer: Gregory Status: ready -->
44
<!-- CREDITS: dallas, mowangjuanzi, Luffy -->
55
<!-- 请保持此文件与英文文件中相应的每个 ENTITY 行号一一对应以便于对照,修改与更新! -->
66

@@ -233,6 +233,9 @@ PHP 版本中发生变化而不另行通知。使用本扩展应自行承担风
233233

234234

235235

236+
<!ENTITY deprecated.function '此函数已废弃。'>
237+
<!ENTITY removed.function '此函数已移除。'>
238+
236239
<!ENTITY warn.deprecated.feature-5-3-0 '<warning xmlns="http://docbook.org/ns/docbook"><simpara>自 PHP 5.3.0
237240
起,已经<emphasis>废弃</emphasis>此特性。强烈建议不要应用此特性。</simpara></warning>'>
238241

@@ -1456,11 +1459,11 @@ linkend="memcached.expiration" xmlns="http://docbook.org/ns/docbook">到期时
14561459

14571460
<!-- RNP -->
14581461

1459-
<!ENTITY rnp.parameter.ffi-description 'The FFI object returned by rnp_ffi_create.'>
1462+
<!ENTITY rnp.parameter.ffi-description 'The FFI object returned by <function xmlns="http://docbook.org/ns/docbook">rnp_ffi_create</function>.'>
14601463

14611464
<!ENTITY rnp.parameter.key-format 'The key format of the data (GPG, KBX, G10).'>
14621465

1463-
<!ENTITY rnp.parameter.loadsave-flags 'See RNP_LOAD_SAVE_* flags description.'>
1466+
<!ENTITY rnp.parameter.loadsave-flags 'See <constant xmlns="http://docbook.org/ns/docbook">RNP_LOAD_SAVE_<replaceable>*</replaceable></constant> flags description.'>
14641467

14651468
<!-- socket entities -->
14661469

@@ -1743,6 +1746,28 @@ It is strongly recommended to avoid timezone abbreviations.
17431746
of the <link linkend="libxml.constants">libxml option constants</link>.
17441747
</para>'>
17451748

1749+
<!ENTITY dom.parameter.compliant.options '&dom.parameter.options;
1750+
<simpara xmlns="http://docbook.org/ns/docbook">
1751+
It is also possible to pass <constant>Dom\HTML_NO_DEFAULT_NS</constant>
1752+
to disable the use of the HTML namespace and the template element.
1753+
This should only be used if the implications are properly understood.
1754+
</simpara>'>
1755+
1756+
<!ENTITY dom.parameter.compliant.encoding '<simpara xmlns="http://docbook.org/ns/docbook">
1757+
The encoding that the document was created in.
1758+
If not provided, it will attempt to determine the encoding that is most likely used.
1759+
</simpara>'>
1760+
1761+
<!ENTITY dom.parser.compliant.note.whitespace '<refsect1 role="notes" xmlns="http://docbook.org/ns/docbook">
1762+
&reftitle.notes;
1763+
<note>
1764+
<simpara>
1765+
Whitespace in the <literal>html</literal> and <literal>head</literal> tags
1766+
is not considered significant and may lose formatting.
1767+
</simpara>
1768+
</note>
1769+
</refsect1>'>
1770+
17461771
<!ENTITY dom.parameters.register_node_ns '<varlistentry xmlns="http://docbook.org/ns/docbook">
17471772
<term><parameter>registerNodeNS</parameter></term>
17481773
<listitem>
@@ -1754,6 +1779,14 @@ It is strongly recommended to avoid timezone abbreviations.
17541779
</listitem>
17551780
</varlistentry>'>
17561781

1782+
<!ENTITY dom.parameters.serialize.options '<simpara xmlns="http://docbook.org/ns/docbook">
1783+
Additional Options.
1784+
The <constant>LIBXML_NOEMPTYTAG</constant>
1785+
and <constant>LIBXML_NOXMLDECL</constant> options are supported.
1786+
Prior to PHP 8.3.0, only the <constant>LIBXML_NOEMPTYTAG</constant>
1787+
option is supported.
1788+
</simpara>'>
1789+
17571790
<!ENTITY dom.errors.hierarchy.parent '<varlistentry xmlns="http://docbook.org/ns/docbook">
17581791
<term><constant>DOM_HIERARCHY_REQUEST_ERR</constant></term>
17591792
<listitem>
@@ -1786,6 +1819,27 @@ It is strongly recommended to avoid timezone abbreviations.
17861819
</listitem>
17871820
</varlistentry>'>
17881821

1822+
<!ENTITY dom.errors.compliant.wrong_document '<listitem xmlns="http://docbook.org/ns/docbook">
1823+
<simpara>
1824+
Throws a <exceptionname>Dom\DOMException</exceptionname> with code
1825+
<constant>Dom\WRONG_DOCUMENT_ERR</constant> if <parameter>node</parameter>
1826+
is from another document.
1827+
</simpara>
1828+
</listitem>'>
1829+
1830+
<!ENTITY dom.errors.compliant.common '<listitem xmlns="http://docbook.org/ns/docbook">
1831+
<simpara>
1832+
Throws a <exceptionname>ValueError</exceptionname> if
1833+
<parameter>options</parameter> contains an invalid option.
1834+
</simpara>
1835+
</listitem>
1836+
<listitem>
1837+
<simpara>
1838+
Throws a <exceptionname>ValueError</exceptionname> if
1839+
<parameter>overrideEncoding</parameter> is an unknown encoding.
1840+
</simpara>
1841+
</listitem>'>
1842+
17891843
<!ENTITY dom.changelog.previous_hierarchy_exception 'Previously this threw a
17901844
<classname xmlns="http://docbook.org/ns/docbook">DOMException</classname> with code
17911845
<constant xmlns="http://docbook.org/ns/docbook">DOM_HIERARCHY_REQUEST_ERR</constant>.'>
@@ -1883,6 +1937,33 @@ It is strongly recommended to avoid timezone abbreviations.
18831937
</entry>
18841938
</row>'>
18851939

1940+
<!ENTITY odbc.changelog.credential-params '<row xmlns="http://docbook.org/ns/docbook">
1941+
<entry>8.4.0</entry>
1942+
<entry>
1943+
<parameter>user</parameter> and <parameter>password</parameter> are now nullable,
1944+
they are now also optional and default to &null;.
1945+
</entry>
1946+
</row>
1947+
<row xmlns="http://docbook.org/ns/docbook">
1948+
<entry>8.4.0</entry>
1949+
<entry>
1950+
Previously, using an empty string for <parameter>password</parameter> would not include
1951+
<literal>pwd</literal> in the generated connection string for <parameter>dsn</parameter>.
1952+
It is now generated to include a <literal>pwd</literal> which has an empty string as its value.
1953+
To restore the previous behaviour <parameter>password</parameter> can now be set to &null;.
1954+
</entry>
1955+
</row>
1956+
<row xmlns="http://docbook.org/ns/docbook">
1957+
<entry>8.4.0</entry>
1958+
<entry>
1959+
Previously, if <parameter>dsn</parameter> contained <literal>uid</literal> or <literal>pwd</literal>
1960+
both <parameter>user</parameter> and <parameter>password</parameter> parameters were ignored.
1961+
Now <parameter>user</parameter> is only ignored if <parameter>dsn</parameter> contains
1962+
<literal>uid</literal>, and <parameter>password</parameter> is only ignored if
1963+
<parameter>dsn</parameter> contains <literal>pwd</literal>.
1964+
</entry>
1965+
</row>'>
1966+
18861967
<!ENTITY odbc.changelog.result-param '<row xmlns="http://docbook.org/ns/docbook">
18871968
<entry>8.4.0</entry>
18881969
<entry>
@@ -2214,19 +2295,6 @@ while <constant>PGSQL_BOTH</constant> will return both numerical and associative
22142295

22152296
<!ENTITY sqlsafemode '<link xmlns="http://docbook.org/ns/docbook" linkend="ini.sql.safe-mode">SQL 安全模式</link>'>
22162297

2217-
<!-- BCMath Notes -->
2218-
<!ENTITY bc.scale.description '<varlistentry xmlns="http://docbook.org/ns/docbook">
2219-
<term><parameter>scale</parameter></term>
2220-
<listitem>
2221-
<simpara>
2222-
此参数用于设置结果中的小数位数。如果为 &null;,则使用 <function>bcscale</function>
2223-
设置的默认小数位数,或者回退到 <link linkend="ini.bcmath.scale"><literal>bcmath.scale</literal></link>
2224-
INI 指令的值。
2225-
</simpara>
2226-
</listitem>
2227-
</varlistentry>'>
2228-
2229-
22302298
<!-- CTYPE Notes -->
22312299
<!ENTITY note.ctype.parameter.integer '<note xmlns="http://docbook.org/ns/docbook"><para>
22322300
如果给出一个 -128 到 255 之间(含)的<type>int</type>, 将会被解释为该值对应的ASCII字符 (负值将加上 256 以支持扩展ASCII字符).
@@ -3170,6 +3238,11 @@ local: {
31703238
<entry>string</entry>
31713239
<entry>Optional. Host with optional port.</entry>
31723240
</row>
3241+
<row>
3242+
<entry>delegated</entry>
3243+
<entry>bool</entry>
3244+
<entry>Optional. If true, this key should be decrypted by the KMIP server.</entry>
3245+
</row>
31733246
</tbody>
31743247
</tgroup>
31753248
</table>

reference/bc/functions/bcadd.xml

Lines changed: 14 additions & 5 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: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
3+
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<refentry xml:id="function.bcadd" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
77
<refname>bcadd</refname>
@@ -41,7 +41,16 @@
4141
</para>
4242
</listitem>
4343
</varlistentry>
44-
&bc.scale.description;
44+
<varlistentry xml:id="function.bcadd..parameters.scale">
45+
<term><parameter>scale</parameter></term>
46+
<listitem>
47+
<simpara>
48+
此参数用于设置结果小数点后的位数。
49+
如果为 &null;,则默认为使用 <function>bcscale</function> 设置的默认精度,
50+
或者回退到 <link linkend="ini.bcmath.scale"><literal>bcmath.scale</literal></link> INI 指令的值。
51+
</simpara>
52+
</listitem>
53+
</varlistentry>
4554
</variablelist>
4655
</para>
4756
</refsect1>
@@ -89,7 +98,7 @@
8998
</tgroup>
9099
</informaltable>
91100
</refsect1>
92-
101+
93102
<refsect1 role="examples">
94103
&reftitle.examples;
95104
<example>
@@ -109,7 +118,7 @@ echo bcadd($a, $b, 4); // 6.2340
109118
</programlisting>
110119
</example>
111120
</refsect1>
112-
121+
113122
<refsect1 role="seealso">
114123
&reftitle.seealso;
115124
<para>

reference/bc/functions/bcdiv.xml

Lines changed: 5 additions & 5 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: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
3+
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<refentry xml:id="function.bcdiv" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
66
<refnamediv>
77
<refname>bcdiv</refname>
@@ -41,7 +41,7 @@
4141
</para>
4242
</listitem>
4343
</varlistentry>
44-
&bc.scale.description;
44+
<xi:include xpointer="function.bcadd..parameters.scale" />
4545
</variablelist>
4646
</para>
4747
</refsect1>
@@ -88,7 +88,7 @@
8888
</tgroup>
8989
</informaltable>
9090
</refsect1>
91-
91+
9292
<refsect1 role="examples">
9393
&reftitle.examples;
9494
<example>
@@ -104,7 +104,7 @@ echo bcdiv('105', '6.55957', 3); // 16.007
104104
</programlisting>
105105
</example>
106106
</refsect1>
107-
107+
108108
<refsect1 role="seealso">
109109
&reftitle.seealso;
110110
<para>

reference/bc/functions/bcpow.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
5-
<refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook">
3+
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
5+
<refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
66
<refnamediv>
77
<refname>bcpow</refname>
88
<refpurpose>任意精度数字的乘方</refpurpose>
@@ -42,7 +42,7 @@
4242
</para>
4343
</listitem>
4444
</varlistentry>
45-
&bc.scale.description;
45+
<xi:include xpointer="function.bcadd..parameters.scale" />
4646
</variablelist>
4747
</para>
4848
</refsect1>
@@ -84,7 +84,7 @@
8484
<row>
8585
<entry>8.4.0</entry>
8686
<entry>
87-
<literal>0</literal> 的负幂以前返回 0,但现在会引发 <exceptionname>DivisionByZeroError</exceptionname> 异常。
87+
<literal>0</literal> 的负幂以前返回 <literal>0</literal>,但现在会引发 <exceptionname>DivisionByZeroError</exceptionname> 异常。
8888
</entry>
8989
</row>
9090
<row>
@@ -104,7 +104,7 @@
104104
</tgroup>
105105
</informaltable>
106106
</refsect1><!-- }}} -->
107-
107+
108108
<refsect1 role="examples">
109109
&reftitle.examples;
110110
<example>
@@ -140,7 +140,7 @@ echo bcpow('5', '2', 2); // 打印 "25" 而不是 "25.00"
140140
</para>
141141
</note>
142142
</refsect1>
143-
143+
144144
<refsect1 role="seealso">
145145
&reftitle.seealso;
146146
<para>

reference/bc/functions/bcsqrt.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
4-
<!-- CREDITS: mowangjuanzi -->
5-
<refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook">
3+
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
4+
<!-- CREDITS: mowangjuanzi, Luffy -->
5+
<refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
66
<refnamediv>
77
<refname>bcsqrt</refname>
88
<refpurpose>任意精度数字的二次方根</refpurpose>
@@ -32,7 +32,7 @@
3232
</para>
3333
</listitem>
3434
</varlistentry>
35-
&bc.scale.description;
35+
<xi:include xpointer="function.bcadd..parameters.scale" />
3636
</variablelist>
3737
</para>
3838
</refsect1>

0 commit comments

Comments
 (0)