(PECL memcached >= 0.1.0)
Memcached::getResultCode — Return the result code of the last operation
Memcached::getResultCode() returns one of the Memcached::RES_* constants that is the result of the last executed Memcached method.
Diese Funktion hat keine Parameter.
Result code of the last Memcached operation.
Beispiel #1 Memcached::getResultCode() example
<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
$m->add('foo', 'bar');
if ($m->getResultCode() == Memcached::RES_NOTSTORED) {
/* ... */
}
?>
Memcached::RES_* values:
* Memcached::RES_SUCCESS: 0
* Memcached::RES_FAILURE: 1
* Memcached::RES_HOST_LOOKUP_FAILURE: 2
* Memcached::RES_UNKNOWN_READ_FAILURE: 7
* Memcached::RES_PROTOCOL_ERROR: 8
* Memcached::RES_CLIENT_ERROR: 9
* Memcached::RES_SERVER_ERROR: 10
* Memcached::RES_WRITE_FAILURE: 5
* Memcached::RES_DATA_EXISTS: 12
* Memcached::RES_NOTSTORED: 14
* Memcached::RES_NOTFOUND: 16
* Memcached::RES_PARTIAL_READ: 18
* Memcached::RES_SOME_ERRORS: 19
* Memcached::RES_NO_SERVERS: 20
* Memcached::RES_END: 21
* Memcached::RES_ERRNO: 25
* Memcached::RES_BUFFERED: 31
* Memcached::RES_TIMEOUT: 30
* Memcached::RES_BAD_KEY_PROVIDED: 32
* Memcached::RES_CONNECTION_SOCKET_CREATE_FAILURE: 11
* Memcached::RES_PAYLOAD_FAILURE: -1001