3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass{ public function setProperty1($property1){ $this->property1 = $property1; return $this; } public function setProperty2($property2){ $this->property2 = $property2; return $this; } public function setProperty3($property3){ $this->property3 = $property3; return $this; } public function setProperty4($property4){ $this->property4 = $property4; return $this; } public function setProperty5($property5){ $this->property5 = $property5; return $this; } } $obj = new MyClass(); $obj->setProperty1("p1"); $obj->setProperty2(""); $obj->setProperty3(null); echo json_encode($obj);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property MyClass::$property1 is deprecated in /in/biEPB on line 7 Deprecated: Creation of dynamic property MyClass::$property2 is deprecated in /in/biEPB on line 12 Deprecated: Creation of dynamic property MyClass::$property3 is deprecated in /in/biEPB on line 17 {"property1":"p1","property2":"","property3":null}

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
169.81 ms | 406 KiB | 5 Q