3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private string $bar = "foo"; private function foo(): array {} } class Bar extends Foo { private array $bar = []; private function foo($foo): int {} } class Baz extends Bar { public self $bar; } $baz = new Baz(); $baz->bar = $baz; var_dump($baz);
Output for git.master_jit, git.master
object(Baz)#1 (3) { ["bar":"Foo":private]=> string(3) "foo" ["bar":"Bar":private]=> array(0) { } ["bar"]=> *RECURSION* }

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:
31.76 ms | 405 KiB | 5 Q