3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static $b; } class B { public function __get($name) { $this->__set($name, new C); return $this->$name; } public function __set($name, $value) { $this->$name = $value; } } class C { public function test() { return new D; } } class D { public $d; } A::$b = new B; A::$b->c->test()->d = 'waa'; A::$b->c->test()->d = 'waa';
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property B::$c is deprecated in /in/LoXRg on line 18

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