Skip to content
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
17 changes: 9 additions & 8 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: 4c352e683436649edba35a3272210d8ca4cae611 Maintainer: takagi Status: ready -->
<!-- EN-Revision: 594c8c0a0188faae493b7070b3c1e331678e1655 Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,mumumu,jdkfx -->
<chapter xml:id="language.functions" xmlns="http://docbook.org/ns/docbook" annotations="interactive">
<title>関数</title>
Expand Down Expand Up @@ -770,6 +770,13 @@ var_dump(foo(...[1, 2], b: 20)); // Fatal error. Named parameter $b overwrites p
</programlisting>
</example>

<simpara>
<function>session_set_save_handler</function> など一部の内部関数には、
代替のシグネチャが記載されていますが、
そのシグネチャの引数名は関数自体には存在しません。
これらの名前は名前付き引数として使えず、指定するとエラーになります。
</simpara>

</sect2>
</sect1>

Expand Down Expand Up @@ -1287,13 +1294,7 @@ class Cart

public function add($product, $quantity)
{
$this->products[$product] = $quantity;
}

public function getQuantity($product)
{
return isset($this->products[$product]) ? $this->products[$product] :
FALSE;
$this->products[$product] = ($this->products[$product] ?? 0) + $quantity;
}

public function getTotal($tax)
Expand Down
4 changes: 2 additions & 2 deletions language/oop5/object-comparison.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: dff848b17dafaabfb7662ffb5fecfcb04e3b771d Maintainer: hirokawa Status: ready -->
<!-- EN-Revision: a2a11180e43d242a92dd299eab74b1ea68bb7de6 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka,mumumu -->
<sect1 xml:id="language.oop5.object-comparison" xmlns="http://docbook.org/ns/docbook">
<title>オブジェクトの比較</title>
Expand Down Expand Up @@ -32,7 +32,7 @@ function bool2str($bool)
}
}

function compareObjects(&$o1, &$o2)
function compareObjects($o1, $o2)
{
echo 'o1 == o2 : ' . bool2str($o1 == $o2) . "\n";
echo 'o1 != o2 : ' . bool2str($o1 != $o2) . "\n";
Expand Down
13 changes: 12 additions & 1 deletion language/predefined/weakmap/offsetexists.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: d27fdfe8f990c14955354176a615e6e8daeb0525 Maintainer: mumumu Status: ready -->
<!-- EN-Revision: 069aa704c59a1862dc92fe7d8ffce80a37801735 Maintainer: mumumu Status: ready -->
<refentry xml:id="weakmap.offsetexists" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>WeakMap::offsetExists</refname>
Expand Down Expand Up @@ -40,6 +40,17 @@
そうでない場合、&false; を返します。
</para>
</refsect1>

<refsect1 role="notes">
&reftitle.notes;
<note>
<simpara>
<function>isset</function> と同様に、<parameter>object</parameter>
に関連付けられた値が &null; の場合は、オブジェクトがマップ内に含まれていても、
このメソッドは &false; を返します。
</simpara>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
Expand Down
6 changes: 3 additions & 3 deletions language/types/numeric-strings.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: 7132d8833a86604aa2d10c16c0470d0ef1a0fdfb Maintainer: mumumu Status: ready -->
<!-- EN-Revision: df7a8d34320b0f519dbbb62139c8a8edfa506cea Maintainer: mumumu Status: ready -->

<sect1 xml:id="language.types.numeric-strings" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>数値形式の文字列</title>
Expand Down Expand Up @@ -65,7 +65,7 @@ var_dump("2E1" == "020"); // true, "2E1" は 2 * (10 ^ 1), または 20
<simpara>
文字列が数値の場合、その文字列が整数の数値形式の文字列であり、かつ
<type>int</type> 型の範囲
(<constant>PHP_INT_MAX</constant> で定義されています)
(<constant>PHP_INT_MIN</constant> と <constant>PHP_INT_MAX</constant> で定義されています)
に含まれる場合、<type>int</type> に解決されます。
そうでない場合、<type>float</type> に解決されます。
</simpara>
Expand All @@ -77,7 +77,7 @@ var_dump("2E1" == "020"); // true, "2E1" は 2 * (10 ^ 1), または 20

文字列の先頭部分が整数の数値形式の文字列であり、かつそれが
<type>int</type> 型の範囲
(<constant>PHP_INT_MAX</constant> で定義されています)
(<constant>PHP_INT_MIN</constant> と <constant>PHP_INT_MAX</constant> で定義されています)
に含まれる場合、<type>int</type> に解決されます。
そうでない場合、<type>float</type> に解決されます。

Expand Down
19 changes: 18 additions & 1 deletion language/variables.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: 0e72b54621406de1c5642334258462725ca99a29 Maintainer: takagi Status: ready -->
<!-- EN-Revision: cc96728a01c9429c0e4cf06c746ec26385ca4e7e Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,mumumu -->
<chapter xml:id="language.variables" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
annotations="interactive">
Expand Down Expand Up @@ -536,12 +536,29 @@ function test()
if ($count < 10) {
test();
}
// インクリメントを取り消します。これで test() の終了時には $count が 0 に戻り、
// 後で test() を呼び出したときも 1 から数え直します
$count--;
}

test();
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
1
2
3
4
5
6
7
8
9
10
]]>
</screen>
</example>
</para>

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: c62ef37e0d58067b393a6cf3a14aefed90bc0bff Maintainer: takagi Status: ready -->
<!-- EN-Revision: 6de6d6a839a44f594b4f82609bfafb95bdb3d3ff Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,mumumu -->

<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">
Expand Down Expand Up @@ -45,6 +45,7 @@
<simpara>
<filename>php://input</filename> は読み込み専用のストリームで、
リクエストの body 部から生のデータを読み込むことができます。
何度でもオープンして読み込めます。
<link linkend="ini.enable-post-data-reading">enable_post_data_reading</link> オプションが有効になっている場合、
かつ <literal>enctype="multipart/form-data"</literal> を指定した POST リクエストでは、<filename>php://input</filename> は使用できません。
</simpara>
Expand Down
6 changes: 2 additions & 4 deletions reference/session/functions/session-set-save-handler.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: 38bdb42b928616a559444a29fb5ae41f150fec59 Maintainer: takagi Status: ready -->
<!-- EN-Revision: 594c8c0a0188faae493b7070b3c1e331678e1655 Maintainer: takagi Status: ready -->
<!-- CREDITS: hirokawa,shimooka,mumumu -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.session-set-save-handler" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand All @@ -21,9 +21,7 @@
<methodparam choice="opt"><type>callable</type><parameter>validate_sid</parameter></methodparam>
<methodparam choice="opt"><type>callable</type><parameter>update_timestamp</parameter></methodparam>
</methodsynopsis>
<para>
次のプロトタイプでも登録できます。
</para>
<simpara>代替のシグネチャ (名前付き引数をサポートしていません):</simpara>
<methodsynopsis>
<type>bool</type><methodname>session_set_save_handler</methodname>
<methodparam><type>object</type><parameter>sessionhandler</parameter></methodparam>
Expand Down
Loading