language/control-structures/declare.xml
28529d3539b850e870e3aa97570f4db0e53daa03
...
...
@@ -32,8 +32,8 @@ declare (directive)
32
32
<link linkend="control-structures.declare.encoding">encoding</link>
33
33
directive) and the <literal>strict_types</literal> directive (See for more
34
34
information the
35
-
<link linkend="language.types.declarations.strict">strict</link>
36
-
section on the Function arguments page)
35
+
<link linkend="language.types.declarations.strict">strict typing</link>
36
+
section on the type declarations page)
37
37
</para>
38
38

39
39
<para>
...
...
@@ -122,13 +122,13 @@ function tick_handler()
122
122
echo "tick_handler() called\n";
123
123
}
124
124

125
-
register_tick_function('tick_handler');
125
+
register_tick_function('tick_handler'); // causes a tick event
126
126

127
-
$a = 1;
127
+
$a = 1; // causes a tick event
128
128

129
129
if ($a > 0) {
130
-
$a += 2;
131
-
print($a);
130
+
$a += 2; // causes a tick event
131
+
print $a; // causes a tick event
132
132
}
133
133

134
134
?>
...
...
@@ -136,34 +136,6 @@ if ($a > 0) {
136
136
</programlisting>
137
137
</example>
138
138
</para>
139
-
<para>
140
-
<example>
141
-
<title>Ticks usage example</title>
142
-
<programlisting role="php">
143
-
<![CDATA[
144
-
<?php
145
-

146
-
function tick_handler()
147
-
{
148
-
echo "tick_handler() called\n";
149
-
}
150
-

151
-
$a = 1;
152
-
tick_handler();
153
-

154
-
if ($a > 0) {
155
-
$a += 2;
156
-
tick_handler();
157
-
print($a);
158
-
tick_handler();
159
-
}
160
-
tick_handler();
161
-

162
-
?>
163
-
]]>
164
-
</programlisting>
165
-
</example>
166
-
</para>
167
139
<simpara>
168
140
See also <function>register_tick_function</function> and
169
141
<function>unregister_tick_function</function>.
170
142