In PHP, what is a Tick?

This link (found via Google) says that Ticks are

a underused and powerful feature of PHP that allows you to implement exceptions in PHP4

But you're probably not talking about PHP4, in which case, go with the other answers.


I found a decent explanation here. I have used them in writing daemons.

I think declare() might be planned for deprecation. I know it was at one point.

EDIT: It was the ticks directive that was planned for deprecation.


In PHP, a tick is like an event which is triggered after every n-th statement (the n is declared using declare), with a few exceptions such as control structures (if, for, ...). It is possible to register a tick handler, which would be called every tick. This is a very rarely used feature, but sometimes it may be helpful, for example, for simple profiling.

Tags:

Php