downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Memcached::increment> <Memcached::getStats
[edit] Last updated: Fri, 17 May 2013

view this page in

Memcached::getVersion

(PECL memcached >= 0.1.5)

Memcached::getVersionGet server pool version info

Descrizione

public array Memcached::getVersion ( void )

Memcached::getVersion() returns an array containing the version info for all available memcache servers.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Array of server versions, one entry per server.

Esempi

Example #1 Memcached::getVersion() example

<?php
$m 
= new Memcached();
$m->addServer('localhost'11211);

print_r($m->getVersion());
?>

Il precedente esempio visualizzerĂ  qualcosa simile a:

Array
(
    [localhost:11211] => 1.2.6
)



add a note add a note User Contributed Notes Memcached::getVersion - [2 notes]
up
0
Mads Madsen
3 months ago
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.
up
-2
Nap
1 year ago
You can use this function to check if any connections is available. It returns false if all memcached servers are down.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites