apcu_cas
PECL apcu >= 4.0.0
apcu_cas - Updates an old value with a new value
Manual
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.