September 2001
Intermediate to advanced
768 pages
32h 45m
English
A tick function is a normal function or method that has been registered with register_tick_function(). The function can either be a built-in function or a user-defined function. Methods should be registered using array ($object,'method_name') syntax, as in the following examples:
<?php
// Register a built-in function
register_tick_function ('flush');
// Register a user-defined function
function say_hi () {
echo 'Hi!<br />';
}
register_tick_function ('say_hi');
// Register a method
class foo {
// Empty constructor to avoid trouble with older versions of PHP
function foo (){}
function test () {
echo "test<br />";
}
}
$f = new foo ();
register_tick_function (array ($f, 'test'));
?> At the time a function (or method) is registered, ...
Read now
Unlock full access