svn: /phpdoc/ja/trunk/language/control-structures/ declare.xml
| From: | TAKAGI Masahiro | Date: | Thu, 23 Oct 2014 22:08:48 +0000 |
| Subject: | svn: /phpdoc/ja/trunk/language/control-structures/ declare.xml | ||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-4289@lists.php.net to get a copy of this message | ||
takagi Thu, 23 Oct 2014 22:08:48 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=335131
Log:
Sync with en
Changed paths:
U phpdoc/ja/trunk/language/control-structures/declare.xml
Modified: phpdoc/ja/trunk/language/control-structures/declare.xml
===================================================================
--- phpdoc/ja/trunk/language/control-structures/declare.xml 2014-10-23 20:12:55 UTC (rev 335130)
+++ phpdoc/ja/trunk/language/control-structures/declare.xml 2014-10-23 22:08:48 UTC (rev 335131)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 334374 Maintainer: takagi Status: ready -->
+<!-- EN-Revision: 335128 Maintainer: takagi Status: ready -->
<sect1 xml:id="control-structures.declare" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title><literal>declare</literal></title>
@@ -34,6 +34,25 @@
</simpara>
</note>
<para>
+
ディレクティブの処理は、ファイルをコンパイルする際に行われるので、
+ ディテクティブの値として渡せるのは、リテラルだけとなります。
+ 変数や定数は、使えません。以下に例を示します。
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+<?php
+// これは有効です
+declare(ticks=1);
+
+// これは無効です
+const TICK_VALUE = 1;
+declare(ticks=TICK_VALUE);
+?>
+]]>
+ </programlisting>
+ </informalexample>
+ </para>
+ <para>
<literal>declare</literal>ブロックの<literal>文</literal>
の実行のされ方や実行時にどのような作用が起こるかについては
<literal>命令</literal>に何が指定されたかに依存します。