I'm currently writing a small article on using the "declare" construct, but I've run into something that has puzzled me. When issuing the following code, I notice the expected 2 results of "I was called from a tick!" statement.
Code: Select all
<?php
function my_callback_function() {
echo "I was called from a tick!<br />";
}
register_tick_function("my_callback_function");
declare(ticks = 1) {
$x = 10;
}
?>
Code: Select all
<?php
function my_callback_function() {
echo "I was called from a tick!<br />";
}
register_tick_function("my_callback_function");
declare(ticks = 1) {
// $x = 10;
}
?>
Code: Select all
<?php
function my_callback_function() {
echo "I was called from a tick!<br />";
}
register_tick_function("my_callback_function");
declare(ticks = 1) {
}
?>
-Jon