public array Aerospike::getNodes ( void )
public int Aerospike::info ( string $request, string &$response [, array $host ] )
public array Aerospike::infoMany ( string $request [, array $config ] )
<?php
$config = ["hosts" => [["addr"=>"localhost", "port"=>3000]], "shm"=>[]];
$opts = [Aerospike::OPT_CONNECT_TIMEOUT => 1250];
$client = new Aerospike($config, true, $opts);
if (!$client->isConnected()) {
echo "Aerospike failed to connect[{$client->errorno()}]: {$client->error()}\n";
exit(1);
}
$status = $client->info('bins/test', $response);
if ($status == Aerospike::OK) {
var_dump($response);
}
// Get the nodes in the cluster
$nodes = $client->getNodes();
var_dump($nodes);
?>