committed all tests for PHP client and fixed bugs