PHP 8.3.4 Released!

Memcached::replace

(PECL memcached >= 0.1.0)

Memcached::replaceReplace the item under an existing key

Descrizione

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

Memcached::replace() is similar to Memcached::set(), but the operation fails if the key does not exist on the server.

Elenco dei parametri

key

La chiave in cui salvare il valore.

value

Il valore da salvare.

expiration

La data di scadenza, il default è 0. Vedere Date di scadenza per ulteriori informazioni.

Valori restituiti

Restituisce true in caso di successo, false in caso di fallimento. The Memcached::getResultCode() will return Memcached::RES_NOTSTORED if the key does not exist.

Vedere anche:

add a note

User Contributed Notes

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