3v4l.org

run code in 200+ php & hhvm versions
<?php class Foo { public $bar = 1; } $f = new Foo; $f->baz = 2; var_dump($f); unset($f->bar, $f->baz); var_dump($f);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
object(Foo)#1 (2) { ["bar"]=> int(1) ["baz"]=> int(2) } object(Foo)#1 (0) { }
Output for Array change keys
object(Foo)#1 (2) { ["bar"]=> int(1) ["baz"]=> int(2) } object(Foo)#1 (0) { }
Output for Lexical anon
object(Foo)#1 (2) { ["bar"]=> int(1) ["baz"]=> int(2) } object(Foo)#1 (0) { }

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