Adding a modified example script taken from php-zookeeper's example showcasing the use of callback function