3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function __set($name, $value) { if ($value == 'mooo') $this->doSomethingPotentiallySetty(); var_dump(property_exists($this, $name)); } public function doSomethingPotentiallySetty() { $this->test = 123; } } $x = new x(); $x->doSomethingPotentiallySetty(); var_dump($x); $x->test = 'mooo'; var_dump($x);
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) object(x)#1 (0) { } Deprecated: Creation of dynamic property x::$test is deprecated in /in/NCgaU on line 15 bool(true) object(x)#1 (1) { ["test"]=> int(123) }

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:
38.43 ms | 401 KiB | 8 Q