PHP 8.5.0 Alpha 2 available for testing

Memcached::replace

(PECL memcached >= 0.1.0)

Memcached::replaceRemplaza un elemento bajo una clave

Descripción

public Memcached::replace(string $key, mixed $value, int $expiration = 0): bool

Memcached::replace() es similar a Memcached::set(), pero la operación fallará si la clave key no existe en el servidor.

Parámetros

key

The key under which to store the value.

value

The value to store.

expiration

The expiration time, defaults to 0. See Expiration Times for more info.

Valores devueltos

Esta función retorna true en caso de éxito o false si ocurre un error. El método Memcached::getResultCode() devuelve Memcached::RES_NOTFOUND si la clave no existe.

Ver también

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top