3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'baz'; } class FooProxy extends Foo { private $wrapped; public function __construct(Foo $foo) { $this->wrapped = $foo; unset($this->bar); } public function & __get($name) { var_dump(__METHOD__); return $this->wrapped->$name; } public function __set($name, $value) { var_dump(__METHOD__); $this->wrapped->$name = $value; } public function __isset($name) { var_dump(__METHOD__); return isset($this->wrapped->$name); } public function __unset($name) { var_dump(__METHOD__); unset($this->wrapped->$name); } } $foo = new FooProxy(new Foo()); $foo->bar; $foo->bar = 'baz'; isset($foo->bar); unset($foo->bar);
Output for git.master, git.master_jit, rfc.property-hooks
string(15) "FooProxy::__get" string(15) "FooProxy::__set" string(17) "FooProxy::__isset" string(17) "FooProxy::__unset"

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