register_tick_function

(PHP 4 >= 4.0.3, PHP 5, PHP 7, PHP 8)

register_tick_functionRegister a function for execution on each tick

Descrizione

register_tick_function(callable $callback, mixed ...$args): bool

Registers the given callback to be executed when a tick is called.

Elenco dei parametri

callback

The function to register.

args

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento.

Esempi

Example #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);
?>

Vedere anche: