3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $untyped = 'old'; private string $typed = 'old'; public function clear() { unset($this->untyped); unset($this->typed); } public function reinitialise() { $this->typed = 'new'; $this->untyped = 'new'; } } $foo = new Foo; var_dump($foo); $foo->clear(); var_dump($foo); $foo->reinitialise(); var_dump($foo);
Output for git.master, git.master_jit, rfc.property-hooks
object(Foo)#1 (2) { ["untyped":"Foo":private]=> string(3) "old" ["typed":"Foo":private]=> string(3) "old" } object(Foo)#1 (0) { ["typed":"Foo":private]=> uninitialized(string) } object(Foo)#1 (2) { ["untyped":"Foo":private]=> string(3) "new" ["typed":"Foo":private]=> string(3) "new" }

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:
23.69 ms | 402 KiB | 8 Q