3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait P1 { public $x; } trait P2 { use P1; public $y; } trait P3 { use P2; public $z; } class A { use P1; } class B { use P2; } class C { use P2; use P3; } $c = new C; $c->x = 42; $c->y = 37; $c->z = 23; var_dump($c);
Output for git.master, git.master_jit, rfc.property-hooks
object(C)#1 (3) { ["y"]=> int(37) ["x"]=> int(42) ["z"]=> int(23) }

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