How Ticks Work
Ticks work via the conjunction of two different mechanisms—a special type of control block called a declare block and the register_tick_function() function. The declare block allows zero or more expressions to be grouped together, while register_tick_function() allows the developer to set a tick function. The tick function will be called once for every one or more expressions within the declare block.
Declare Blocks
Declare blocks use a structure similar to other control blocks (such as while or for). The block has an initialization block, followed by a body section.
The initialization block (enclosed in parentheses) can contain special declare directives.As of PHP 4.0.6, only one directive is valid: ticks. Syntax for the ticks ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access