Skip to content

Sync bc functions #965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions language-defs.ent
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 5097918a78b2d1de0839a48bd30912d498ac5850 Maintainer: yincheng Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: a6621a4baf56fd78a842dfd684f5c981991bddcd Maintainer: yincheng Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<!-- Part titles used mostly in manual.xml itself -->
<!ENTITY PHPManual "PHP 手册">
<!ENTITY Seealso "参见">
Expand Down Expand Up @@ -45,7 +45,7 @@
<!ENTITY UIExtensions "图形用户界面(GUI) 扩展">
<!ENTITY Appendices "附录">
<!ENTITY PEAR "PEAR:PHP 扩展与应用资源库">
<!ENTITY FAQ "FAQ:常见问题">
<!ENTITY FAQ "常见问题">
<!ENTITY FAQabbrev "FAQ">
<!ENTITY Internals "PHP 和 Zend 引擎内部资料">
<!ENTITY Internals2 "PHP 核心:骇客指南">
Expand Down
105 changes: 89 additions & 16 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: ffd2ef754b37526c0b96e94859d57ce06acfbf41 Maintainer: Gregory Status: ready -->
<!-- EN-Revision: cb573d7f33644962dcf32003e5898cf4d67be6ac Maintainer: Gregory Status: ready -->
<!-- CREDITS: dallas, mowangjuanzi, Luffy -->
<!-- 请保持此文件与英文文件中相应的每个 ENTITY 行号一一对应以便于对照,修改与更新! -->

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



<!ENTITY deprecated.function '此函数已废弃。'>
<!ENTITY removed.function '此函数已移除。'>

<!ENTITY warn.deprecated.feature-5-3-0 '<warning xmlns="http://docbook.org/ns/docbook"><simpara>自 PHP 5.3.0
起,已经<emphasis>废弃</emphasis>此特性。强烈建议不要应用此特性。</simpara></warning>'>

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

<!-- RNP -->

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

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

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

<!-- socket entities -->

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

<!ENTITY dom.parameter.compliant.options '&dom.parameter.options;
<simpara xmlns="http://docbook.org/ns/docbook">
It is also possible to pass <constant>Dom\HTML_NO_DEFAULT_NS</constant>
to disable the use of the HTML namespace and the template element.
This should only be used if the implications are properly understood.
</simpara>'>

<!ENTITY dom.parameter.compliant.encoding '<simpara xmlns="http://docbook.org/ns/docbook">
The encoding that the document was created in.
If not provided, it will attempt to determine the encoding that is most likely used.
</simpara>'>

<!ENTITY dom.parser.compliant.note.whitespace '<refsect1 role="notes" xmlns="http://docbook.org/ns/docbook">
&reftitle.notes;
<note>
<simpara>
Whitespace in the <literal>html</literal> and <literal>head</literal> tags
is not considered significant and may lose formatting.
</simpara>
</note>
</refsect1>'>

<!ENTITY dom.parameters.register_node_ns '<varlistentry xmlns="http://docbook.org/ns/docbook">
<term><parameter>registerNodeNS</parameter></term>
<listitem>
Expand All @@ -1754,6 +1779,14 @@ It is strongly recommended to avoid timezone abbreviations.
</listitem>
</varlistentry>'>

<!ENTITY dom.parameters.serialize.options '<simpara xmlns="http://docbook.org/ns/docbook">
Additional Options.
The <constant>LIBXML_NOEMPTYTAG</constant>
and <constant>LIBXML_NOXMLDECL</constant> options are supported.
Prior to PHP 8.3.0, only the <constant>LIBXML_NOEMPTYTAG</constant>
option is supported.
</simpara>'>

<!ENTITY dom.errors.hierarchy.parent '<varlistentry xmlns="http://docbook.org/ns/docbook">
<term><constant>DOM_HIERARCHY_REQUEST_ERR</constant></term>
<listitem>
Expand Down Expand Up @@ -1786,6 +1819,27 @@ It is strongly recommended to avoid timezone abbreviations.
</listitem>
</varlistentry>'>

<!ENTITY dom.errors.compliant.wrong_document '<listitem xmlns="http://docbook.org/ns/docbook">
<simpara>
Throws a <exceptionname>Dom\DOMException</exceptionname> with code
<constant>Dom\WRONG_DOCUMENT_ERR</constant> if <parameter>node</parameter>
is from another document.
</simpara>
</listitem>'>

<!ENTITY dom.errors.compliant.common '<listitem xmlns="http://docbook.org/ns/docbook">
<simpara>
Throws a <exceptionname>ValueError</exceptionname> if
<parameter>options</parameter> contains an invalid option.
</simpara>
</listitem>
<listitem>
<simpara>
Throws a <exceptionname>ValueError</exceptionname> if
<parameter>overrideEncoding</parameter> is an unknown encoding.
</simpara>
</listitem>'>

<!ENTITY dom.changelog.previous_hierarchy_exception 'Previously this threw a
<classname xmlns="http://docbook.org/ns/docbook">DOMException</classname> with code
<constant xmlns="http://docbook.org/ns/docbook">DOM_HIERARCHY_REQUEST_ERR</constant>.'>
Expand Down Expand Up @@ -1883,6 +1937,33 @@ It is strongly recommended to avoid timezone abbreviations.
</entry>
</row>'>

<!ENTITY odbc.changelog.credential-params '<row xmlns="http://docbook.org/ns/docbook">
<entry>8.4.0</entry>
<entry>
<parameter>user</parameter> and <parameter>password</parameter> are now nullable,
they are now also optional and default to &null;.
</entry>
</row>
<row xmlns="http://docbook.org/ns/docbook">
<entry>8.4.0</entry>
<entry>
Previously, using an empty string for <parameter>password</parameter> would not include
<literal>pwd</literal> in the generated connection string for <parameter>dsn</parameter>.
It is now generated to include a <literal>pwd</literal> which has an empty string as its value.
To restore the previous behaviour <parameter>password</parameter> can now be set to &null;.
</entry>
</row>
<row xmlns="http://docbook.org/ns/docbook">
<entry>8.4.0</entry>
<entry>
Previously, if <parameter>dsn</parameter> contained <literal>uid</literal> or <literal>pwd</literal>
both <parameter>user</parameter> and <parameter>password</parameter> parameters were ignored.
Now <parameter>user</parameter> is only ignored if <parameter>dsn</parameter> contains
<literal>uid</literal>, and <parameter>password</parameter> is only ignored if
<parameter>dsn</parameter> contains <literal>pwd</literal>.
</entry>
</row>'>

<!ENTITY odbc.changelog.result-param '<row xmlns="http://docbook.org/ns/docbook">
<entry>8.4.0</entry>
<entry>
Expand Down Expand Up @@ -2214,19 +2295,6 @@ while <constant>PGSQL_BOTH</constant> will return both numerical and associative

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

<!-- BCMath Notes -->
<!ENTITY bc.scale.description '<varlistentry xmlns="http://docbook.org/ns/docbook">
<term><parameter>scale</parameter></term>
<listitem>
<simpara>
此参数用于设置结果中的小数位数。如果为 &null;,则使用 <function>bcscale</function>
设置的默认小数位数,或者回退到 <link linkend="ini.bcmath.scale"><literal>bcmath.scale</literal></link>
INI 指令的值。
</simpara>
</listitem>
</varlistentry>'>


<!-- CTYPE Notes -->
<!ENTITY note.ctype.parameter.integer '<note xmlns="http://docbook.org/ns/docbook"><para>
如果给出一个 -128 到 255 之间(含)的<type>int</type>, 将会被解释为该值对应的ASCII字符 (负值将加上 256 以支持扩展ASCII字符).
Expand Down Expand Up @@ -3170,6 +3238,11 @@ local: {
<entry>string</entry>
<entry>Optional. Host with optional port.</entry>
</row>
<row>
<entry>delegated</entry>
<entry>bool</entry>
<entry>Optional. If true, this key should be decrypted by the KMIP server.</entry>
</row>
</tbody>
</tgroup>
</table>
Expand Down
19 changes: 14 additions & 5 deletions reference/bc/functions/bcadd.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: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.bcadd" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>bcadd</refname>
Expand Down Expand Up @@ -41,7 +41,16 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<varlistentry xml:id="function.bcadd..parameters.scale">
<term><parameter>scale</parameter></term>
<listitem>
<simpara>
此参数用于设置结果小数点后的位数。
如果为 &null;,则默认为使用 <function>bcscale</function> 设置的默认精度,
或者回退到 <link linkend="ini.bcmath.scale"><literal>bcmath.scale</literal></link> INI 指令的值。
</simpara>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
Expand Down Expand Up @@ -89,7 +98,7 @@
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
Expand All @@ -109,7 +118,7 @@ echo bcadd($a, $b, 4); // 6.2340
</programlisting>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
10 changes: 5 additions & 5 deletions reference/bc/functions/bcdiv.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: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.bcdiv" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<refnamediv>
<refname>bcdiv</refname>
Expand Down Expand Up @@ -41,7 +41,7 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<xi:include xpointer="function.bcadd..parameters.scale" />
</variablelist>
</para>
</refsect1>
Expand Down Expand Up @@ -88,7 +88,7 @@
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
Expand All @@ -104,7 +104,7 @@ echo bcdiv('105', '6.55957', 3); // 16.007
</programlisting>
</example>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
14 changes: 7 additions & 7 deletions reference/bc/functions/bcpow.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: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook">
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<refnamediv>
<refname>bcpow</refname>
<refpurpose>任意精度数字的乘方</refpurpose>
Expand Down Expand Up @@ -42,7 +42,7 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<xi:include xpointer="function.bcadd..parameters.scale" />
</variablelist>
</para>
</refsect1>
Expand Down Expand Up @@ -84,7 +84,7 @@
<row>
<entry>8.4.0</entry>
<entry>
<literal>0</literal> 的负幂以前返回 0,但现在会引发 <exceptionname>DivisionByZeroError</exceptionname> 异常。
<literal>0</literal> 的负幂以前返回 <literal>0</literal>,但现在会引发 <exceptionname>DivisionByZeroError</exceptionname> 异常。
</entry>
</row>
<row>
Expand All @@ -104,7 +104,7 @@
</tgroup>
</informaltable>
</refsect1><!-- }}} -->

<refsect1 role="examples">
&reftitle.examples;
<example>
Expand Down Expand Up @@ -140,7 +140,7 @@ echo bcpow('5', '2', 2); // 打印 "25" 而不是 "25.00"
</para>
</note>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<para>
Expand Down
8 changes: 4 additions & 4 deletions reference/bc/functions/bcsqrt.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: c7e83fbbbcde9f54affc09424d032c38492a3ff4 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook">
<!-- EN-Revision: 3295741565f760edd22e305bd10e37f243e9e194 Maintainer: jakquan Status: ready -->
<!-- CREDITS: mowangjuanzi, Luffy -->
<refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<refnamediv>
<refname>bcsqrt</refname>
<refpurpose>任意精度数字的二次方根</refpurpose>
Expand Down Expand Up @@ -32,7 +32,7 @@
</para>
</listitem>
</varlistentry>
&bc.scale.description;
<xi:include xpointer="function.bcadd..parameters.scale" />
</variablelist>
</para>
</refsect1>
Expand Down