Adds fluent setters for PHP (#3130)

diff --git a/php/tests/generated_class_test.php b/php/tests/generated_class_test.php
index 21ee849..b42397b 100644
--- a/php/tests/generated_class_test.php
+++ b/php/tests/generated_class_test.php
@@ -877,4 +877,17 @@
         $m = new \Foo\PBEmpty();
         $m = new \PrefixEmpty();
     }
+
+    #########################################################
+    # Test fluent setters.
+    #########################################################
+
+    public function testFluentSetters()
+    {
+        $m = (new TestMessage())
+            ->setOptionalInt32(1)
+            ->setOptionalInt64(2);
+        $this->assertSame(1, $m->getOptionalInt32());
+        $this->assertSame(2, $m->getOptionalInt64());
+    }
 }