apcu_cas

PECL apcu >= 4.0.0
apcu_cas - Updates an old value with a new value
Manual
Code Examples

apcu_cas( string$key, int$old, int$new ): bool

apcu_cas updates an already existing integer value if the old parameter matches the currently stored value with the value of the new parameter.

Parameters

key

The key of the value being updated.

old

The old value (the value currently stored).

new

The new value to update to.

Return Values

Returns true on success or false on failure.

Related Functions

Example of apcu_cas

Show all examples for apcu_cas

PHP Version:


Function apcu_cas:

APC User Cache Functions

Most used PHP functions