php8.5
Home/ Manual/ zookeeper / zookeeper/ Zookeeper::getState

Zookeeper::getState

PHP function Edit on GitHub ✎

(PECL zookeeper >= 0.1.0)

Get the state of the zookeeper connection

Description

Zookeeper::getState(): int

Parameters Parameters

Return Values

Returns the state of zookeeper connection on success, and false on failure.

Errors/Exceptions

This method emits PHP error/warning when it fails to get state of zookeeper connection.

Caution

Since version 0.3.0, this method emits ZookeeperException and its derivatives.

See Also

  • Zookeeper::__construct
  • Zookeeper::connect
  • Zookeeper::getClientId
  • ZooKeeper States
  • ZookeeperException

Source: reference/zookeeper/zookeeper/getstate.xml · from the official PHP manual (php/doc-en)