cvs: phpdoc /en/language control-structures.xml

From: Date: Tue, 03 Jun 2003 23:06:56 +0000
Subject: cvs: phpdoc /en/language control-structures.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969354239@lists.php.net to get a copy of this message
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>

« previous php.doc (#969354239) next »