3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public string $foo { #[\Deprecated] get { return $this->foo; } #[\Deprecated] set { $this->foo = $value; } } } $f = new Foo(); $f->foo = 'dummy'; var_dump($f->foo);
Output for git.master, git.master_jit
Deprecated: Method Foo::$foo::set() is deprecated in /in/C6jRQ on line 21 Deprecated: Method Foo::$foo::get() is deprecated in /in/C6jRQ on line 22 string(5) "dummy"

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:
142.97 ms | 995 KiB | 7 Q