You can use this function to check if any connections is available. It returns false if all memcached servers are down.
Memcached::getVersion
(PECL memcached >= 0.1.5)
Memcached::getVersion — Get server pool version info
Opis
public array Memcached::getVersion
( void
)
Memcached::getVersion() returns an array containing the version info for all available memcache servers.
Parametry
Ta funkcja nie posiada parametrów.
Zwracane wartości
Array of server versions, one entry per server.
Przykłady
Przykład #1 Memcached::getVersion() example
<?php
$m = new Memcached();
$m->addServer('localhost', 11211);
print_r($m->getVersion());
?>
Powyższy przykład wyświetli coś podobnego do:
Array
(
[localhost:11211] => 1.2.6
)
Nap
23-Jul-2011 04:15
