3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { private function test() { echo "a"; } } trait T2{ use T; } class A { use T2; } class B extends A{ public function f(){ $this->test(); } } $a = new B; $a->f();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to private method A::test() from scope B in /in/gBJtW:22 Stack trace: #0 /in/gBJtW(27): B->f() #1 {main} thrown in /in/gBJtW on line 22
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:
46.62 ms | 401 KiB | 8 Q