davey Tue Jun 3 19:06:56 2003 EDT
Modified files:
/phpdoc/en/language control-structures.xml
Log:
Added documentation and example of how declare can be used in the global scope.
Index: phpdoc/en/language/control-structures.xml
diff -u phpdoc/en/language/control-structures.xml:1.73
phpdoc/en/language/control-structures.xml:1.74
--- phpdoc/en/language/control-structures.xml:1.73 Sat May 31 23:55:58 2003
+++ phpdoc/en/language/control-structures.xml Tue Jun 3 19:06:56 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.73 $ -->
+<!-- $Revision: 1.74 $ -->
<chapter id="control-structures">
<title>Control Structures</title>
@@ -925,6 +925,26 @@
it is executed and what side effects occur during execution
may depend on the directive set in the
<literal>directive</literal> block.
+ </para>
+ <para>
+ The <literal>declare</literal> construct can also be used in the global
+ scope, affecting all code following it.
+ <informalexample>
+ <programlisting>
+<![CDATA[
+// these are the same:
+
+// you can use this:
+declare(ticks=1) {
+ // entire script here
+}
+
+// or you can use this:
+declare(ticks=1);
+// entire script here
+]]>
+ </programlist>
+ </informalexample>
</para>
<sect2 id="control-structures.declare.ticks">
<title>Ticks</title>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php