3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class A { private function foo() { print __CLASS__; } } abstract class B extends A { public function foo() { print __CLASS__; } } class C extends B { public function foo() { print __CLASS__; } public function goo() { parent::foo(); a::foo(); } } ($c = new C)->foo(); $c->goo();
Output for git.master_jit, git.master
CB Fatal error: Uncaught Error: Call to private method A::foo() from scope C in /in/pXCpG:22 Stack trace: #0 /in/pXCpG(27): C->goo() #1 {main} thrown in /in/pXCpG 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:
43.12 ms | 523 KiB | 4 Q