Was going mad, I figured getStatus() would return false on servers not responding. This is however not true, it will return:
array(1) {
["127.0.0.1:11112"]=>
string(11) "255.255.255"
}
On a failed connection.
(PECL memcached >= 0.1.5)
Memcached::getVersion — Get server pool version info
Memcached::getVersion() returns an array containing the version info for all available memcache servers.
У цієї функції немає параметрів.
Array of server versions, one entry per server.
Приклад #1 Memcached::getVersion() example
<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
print_r($m->getVersion());
?>
Поданий вище приклад виведе щось схоже на:
Array ( [localhost:11211] => 1.2.6 )
Was going mad, I figured getStatus() would return false on servers not responding. This is however not true, it will return:
array(1) {
["127.0.0.1:11112"]=>
string(11) "255.255.255"
}
On a failed connection.