The "counter" Extension - A Continuing Example
PHP Manual

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

COUNTER_FLAG_PERSIST (integer)
A counter with this flag will be created as a persistent resource.
COUNTER_FLAG_SAVE (integer)
A counter with this flag will be saved between invocations of PHP.
COUNTER_FLAG_NO_OVERWRITE (integer)
This flag causes counter_create() to avoid overwriting an existing named counter with a new one.
COUNTER_META_NAME (string)
Pass this constant to get the name of a counter resource or object.
COUNTER_META_IS_PERISTENT (string)
Pass this constant to determine whether a counter resource or object is persistent (has the COUNTER_FLAG_PERSIST flag).
COUNTER_RESET_NEVER (integer)
The counter will never be reset.
COUNTER_RESET_PER_LOAD (integer)
The counter will be reset on each invocation of PHP.
COUNTER_RESET_PER_REQUEST (integer)
The counter will be reset on each request.

The "counter" Extension - A Continuing Example
PHP Manual