public function getServerStats($server) { try { $interface = new BeanstalkInterface($server); $stats = $interface->getServerStats(); } catch (Pheanstalk_Exception_ConnectionException $e) { $stats = array(); } return $stats; }