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() Fatal error: Uncaught Error: Undefined constant "messageA" in /in/5vt5a:6 Stack trace: #0 /in/5vt5a(14): A->bar() #1 /in/5vt5a(26): B->foo() #2 {main} thrown in /in/5vt5a on line 6
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:
40.72 ms | 401 KiB | 8 Q