mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Added documentation and example of how declare can be used in the global scope.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@130012 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
de42e1b1f9
commit
f1c7ac8fb1
1 changed files with 21 additions and 1 deletions
|
@ -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>
|
||||
|
||||
|
@ -926,6 +926,26 @@ declare (directive) statement
|
|||
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>
|
||||
<para>A tick is an event that occurs for every
|
||||
|
|
Loading…
Reference in a new issue