(PHP 4 >= 4.0.3, PHP 5, PHP 7, PHP 8)
register_tick_function — Register a function for execution on each tick
register_tick_function(callable $callback, mixed ...$args): bool
Registers the given callback to be executed when a tick is called.
callbackThe function to register.
argsExample #1 register_tick_function() example
<?php
declare(ticks=1);
function my_tick_function($param) {
echo "Tick callback function called with param: $param\n";
}
register_tick_function('my_tick_function', true);
?>
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/function.register-tick-function.php