http://uk.php.net/manual/en/control-structures.declare.php
http://uk.php.net/manual/en/function.register-tick-function.php
WARNING: Crashes Apache in multi-threaded environment!
register_tick_function() should not be used with threaded web server modules with PHP 5.2 or lower.
This crashes the server!
<?php
declare(ticks=1);
// A function called on each tick event
function tick_handler() {
echo "tick_handler() called\n";
}
register_tick_function('tick_handler');
$a = 1;
if ($a > 0) {
$a += 2;
print($a);
}
?>
[Home]