Add php doc and fix the test.