array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'memcached.replace.php', 1 => 'Memcached::replace', 2 => 'Replace the item under an existing key', ), 'up' => array ( 0 => 'class.memcached.php', 1 => 'Memcached', ), 'prev' => array ( 0 => 'memcached.quit.php', 1 => 'Memcached::quit', ), 'next' => array ( 0 => 'memcached.replacebykey.php', 1 => 'Memcached::replaceByKey', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/memcached/memcached/replace.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PECL memcached >= 0.1.0)
Memcached::replace — Replace the item under an existing key
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.