mirror of
https://github.com/php/doc-ja.git
synced 2026-03-23 22:52:11 +01:00
[reference/misc] sync with en
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: cdc9d28d334bbc08386fecf8aade66080004a9dd Maintainer: hirokawa Status: ready -->
|
||||
<!-- EN-Revision: a124543dd3f6b1e5567b07420d23899e582514dc Maintainer: hirokawa Status: ready -->
|
||||
<!-- CREDITS: takagi,mumumu -->
|
||||
<refentry xml:id="function.define" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
@@ -45,10 +45,7 @@
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
定数の値。PHP 5 では、<parameter>value</parameter> は
|
||||
スカラー値 (<type>int</type>、
|
||||
<type>float</type>、<type>string</type>、<type>bool</type> あるいは
|
||||
&null;) でなければいけません。PHP 7 では配列を使うこともできます。
|
||||
定数の値。
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
@@ -104,6 +101,12 @@
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>8.1.0</entry>
|
||||
<entry>
|
||||
<parameter>value</parameter> に、オブジェクトを渡せるようになりました。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>8.0.0</entry>
|
||||
<entry>
|
||||
@@ -120,12 +123,6 @@
|
||||
8.0.0 で削除される予定です。
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.0.0</entry>
|
||||
<entry>
|
||||
<type>array</type> が使えるようになりました。
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
@@ -166,7 +163,7 @@ echo ANIMALS[1]; // "cat" を出力します
|
||||
<title>予約された名前を定数にする</title>
|
||||
<para>
|
||||
|
||||
<link linkend="language.constants.predefined">マジック定数</link>
|
||||
<link linkend="language.constants.magic">マジック定数</link>
|
||||
と同じ名前の定数を定義できる <emphasis>可能性</emphasis> を示します。
|
||||
しかしながら、結果として起きる振る舞いは明らかに混乱を招くため、
|
||||
こんなことを実際にすることは推奨されません。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 7926717892c5129038097f8a1fa396e209837575 Maintainer: hirokawa Status: ready -->
|
||||
<!-- EN-Revision: ad0f1eaa6510e1d11231f46515ca513d2cd097c4 Maintainer: hirokawa Status: ready -->
|
||||
<!-- CREDITS: takagi,mumumu -->
|
||||
<refentry xml:id="function.pack" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
@@ -167,7 +167,7 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry>Z</entry>
|
||||
<entry>NUL 埋め文字列</entry>
|
||||
<entry>NUL終端(ASCIIZ) 文字列をNUL で埋める</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>@</entry>
|
||||
@@ -222,7 +222,7 @@
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>7.0.15,7.1.1</entry>
|
||||
<entry>7.0.15, 7.1.1</entry>
|
||||
<entry>
|
||||
"e", "E", "g" および "G" コードが、float と double のバイトオーダーをサポートするために追加されました。
|
||||
</entry>
|
||||
@@ -255,11 +255,14 @@ $binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66);
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<caution>
|
||||
<simpara>フォーマットコード <literal>q</literal>, <literal>Q</literal>, <literal>J</literal>,
|
||||
<literal>P</literal> は、32ビット版のPHPビルドでは利用できません</simpara>
|
||||
</caution>
|
||||
<caution>
|
||||
<para>
|
||||
PHP は、<type>int</type> 型の値を内部的に格納する際に
|
||||
サイズがマシン依存の符号付き値 (C の <literal>long</literal> 型)
|
||||
を使うことに注意しましょう。<type>int</type>
|
||||
サイズがマシン依存の符号付き値を使うことに注意しましょう。<type>int</type>
|
||||
型の範囲外の数値となる整数リテラルや演算結果は <type>float</type>
|
||||
として保持されます。この float 値を integer としてパックする際には
|
||||
まず最初に integer 型へのキャストを行います。
|
||||
|
||||
Reference in New Issue
Block a user