public function __construct($hostList, $timeout = null) { if (!is_null($timeout) && is_numeric($timeout)) { $this->zookeeper = new \ZooKeeper($hostList, null, $timeout); } else { $this->zookeeper = new \ZooKeeper($hostList); } }