3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { public function x(): void { echo 'A'; } } trait B { public function x(): void { echo 'B'; } } class Foo { use A { x as private ax; } use B { x as private bx; } public function x(): void { $this->ax(); $this->bx(); } } (new Foo())->x();
Output for git.master_jit
Fatal error: An alias was defined for method x(), which exists in both A and B. Use A::x or B::x to resolve the ambiguity in /in/vE0YH on line 15
Process exited with code 255.
Output for git.master
Fatal error: An alias was defined for method x(), which exists in both A and B. Use A::x or B::x to resolve the ambiguity in /in/vE0YH on line 15 Stack trace: #0 {main}
Process exited with code 255.

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:
55.74 ms | 406 KiB | 5 Q