Skip to content

Commit 908dd2c

Browse files
committed
[reference/misc] sync with en
1 parent 1deb28e commit 908dd2c

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

reference/misc/functions/define.xml

Lines changed: 9 additions & 12 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: cdc9d28d334bbc08386fecf8aade66080004a9dd Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: a124543dd3f6b1e5567b07420d23899e582514dc Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi,mumumu -->
55
<refentry xml:id="function.define" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -45,10 +45,7 @@
4545
<term><parameter>value</parameter></term>
4646
<listitem>
4747
<para>
48-
定数の値。PHP 5 では、<parameter>value</parameter> は
49-
スカラー値 (<type>int</type>、
50-
<type>float</type>、<type>string</type>、<type>bool</type> あるいは
51-
&null;) でなければいけません。PHP 7 では配列を使うこともできます。
48+
定数の値。
5249
</para>
5350
<warning>
5451
<para>
@@ -104,6 +101,12 @@
104101
</row>
105102
</thead>
106103
<tbody>
104+
<row>
105+
<entry>8.1.0</entry>
106+
<entry>
107+
<parameter>value</parameter> に、オブジェクトを渡せるようになりました。
108+
</entry>
109+
</row>
107110
<row>
108111
<entry>8.0.0</entry>
109112
<entry>
@@ -120,12 +123,6 @@
120123
8.0.0 で削除される予定です。
121124
</entry>
122125
</row>
123-
<row>
124-
<entry>7.0.0</entry>
125-
<entry>
126-
<type>array</type> が使えるようになりました。
127-
</entry>
128-
</row>
129126
</tbody>
130127
</tgroup>
131128
</informaltable>
@@ -166,7 +163,7 @@ echo ANIMALS[1]; // "cat" を出力します
166163
<title>予約された名前を定数にする</title>
167164
<para>
168165

169-
<link linkend="language.constants.predefined">マジック定数</link>
166+
<link linkend="language.constants.magic">マジック定数</link>
170167
と同じ名前の定数を定義できる <emphasis>可能性</emphasis> を示します。
171168
しかしながら、結果として起きる振る舞いは明らかに混乱を招くため、
172169
こんなことを実際にすることは推奨されません。

reference/misc/functions/pack.xml

Lines changed: 8 additions & 5 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: 7926717892c5129038097f8a1fa396e209837575 Maintainer: hirokawa Status: ready -->
3+
<!-- EN-Revision: ad0f1eaa6510e1d11231f46515ca513d2cd097c4 Maintainer: hirokawa Status: ready -->
44
<!-- CREDITS: takagi,mumumu -->
55
<refentry xml:id="function.pack" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -167,7 +167,7 @@
167167
</row>
168168
<row>
169169
<entry>Z</entry>
170-
<entry>NUL 埋め文字列</entry>
170+
<entry>NUL終端(ASCIIZ) 文字列をNUL で埋める</entry>
171171
</row>
172172
<row>
173173
<entry>@</entry>
@@ -222,7 +222,7 @@
222222
</entry>
223223
</row>
224224
<row>
225-
<entry>7.0.15,7.1.1</entry>
225+
<entry>7.0.15, 7.1.1</entry>
226226
<entry>
227227
"e", "E", "g" および "G" コードが、float と double のバイトオーダーをサポートするために追加されました。
228228
</entry>
@@ -255,11 +255,14 @@ $binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66);
255255

256256
<refsect1 role="notes">
257257
&reftitle.notes;
258+
<caution>
259+
<simpara>フォーマットコード <literal>q</literal>, <literal>Q</literal>, <literal>J</literal>,
260+
<literal>P</literal> は、32ビット版のPHPビルドでは利用できません</simpara>
261+
</caution>
258262
<caution>
259263
<para>
260264
PHP は、<type>int</type> 型の値を内部的に格納する際に
261-
サイズがマシン依存の符号付き値 (C の <literal>long</literal> 型)
262-
を使うことに注意しましょう。<type>int</type>
265+
サイズがマシン依存の符号付き値を使うことに注意しましょう。<type>int</type>
263266
型の範囲外の数値となる整数リテラルや演算結果は <type>float</type>
264267
として保持されます。この float 値を integer としてパックする際には
265268
まず最初に integer 型へのキャストを行います。

0 commit comments

Comments
 (0)