Dutch PHP Conference 2025 - Call For Papers

Memcached::replace

(PECL memcached >= 0.1.0)

Memcached::replaceReplace the item under an existing key

Опис

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.

Параметри

key

Ключ, під яким зберігається значення.

value

Значення для зберігання.

expiration

Термін зберігання, стандарно — 0. Докладніше: Терміни зберігання.

Значення, що повертаються

Повертає true у разі успіху або false в разі помилки. The Memcached::getResultCode() will return Memcached::RES_NOTSTORED if the key does not exist.

Прогляньте також

add a note

User Contributed Notes

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