php-zookeeper
php-zookeeper copied to clipboard
Can I get the node stat info?
version: 0.6.4 method: public Zookeeper::get ( string $path [, callable $watcher_cb = NULL [, array &$stat = NULL [, int $max_size = 0 ]]] ) : string
Hello, I want to ask how the third param $stat is? Can show me an example?
<?php
$zookeeper = new Zookeeper('localhost:2181');
$stat = [];
$zookeeper->get('/zookeeper', null, $stat);
var_dump($stat);
array(11) {
["czxid"]=>
float(0)
["mzxid"]=>
float(0)
["ctime"]=>
float(0)
["mtime"]=>
float(0)
["version"]=>
int(0)
["cversion"]=>
int(-2)
["aversion"]=>
int(0)
["ephemeralOwner"]=>
float(0)
["dataLength"]=>
int(0)
["numChildren"]=>
int(2)
["pzxid"]=>
float(0)
}
<?php $zookeeper = new Zookeeper('localhost:2181'); $stat = []; $zookeeper->get('/zookeeper', null, $stat); var_dump($stat);
array(11) { ["czxid"]=> float(0) ["mzxid"]=> float(0) ["ctime"]=> float(0) ["mtime"]=> float(0) ["version"]=> int(0) ["cversion"]=> int(-2) ["aversion"]=> int(0) ["ephemeralOwner"]=> float(0) ["dataLength"]=> int(0) ["numChildren"]=> int(2) ["pzxid"]=> float(0) }
Thank you so much!