To obtain an array containing the version number of each of the
servers, use the getVersion() function:
| API Call | $object->getVersion() | ||
| Asynchronous | no | ||
| Description | Returns the versions of all servers in the server pool | ||
| Returns | array; supported values: | ||
array | Array of the version number for each memcached server in cluster | ||
| Arguments | |||
| None | |||
Returns an array containing the version number of each of the memcached servers in the cluster. Please note that this is not the version number of the cluster.
To get the version number for the nodes in the cluster you may do:
$cb = new Couchbase("localhost", "Administrator", "secret"); $info = json_decode($cb->getInfo()); foreach ($info->{"nodes"} as $node) { print $node->{"hostname"} . " is running " . $node->{"version"} . "\n"; }
To obtain the version information for the client library, use the
getClientVersion() method: