3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $messageA = "A::bar()\n"; public function bar() { print($messageA); C::f(); } } class B extends A { public function foo() { print("B::foo()\n"); A::bar(); } } class C extends B { private $messageC = "C::f()\n"; public function f() { print($messageC); } } $obj = new C; $obj->foo();
Output for git.master, git.master_jit, rfc.property-hooks
B::foo() Warning: Undefined variable $messageA in /in/dLr3q on line 6 Warning: Undefined variable $messageC in /in/dLr3q on line 21

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