3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class ParentClass { public function __get(string $name) { echo "__get($name) was called\n"; } } class ChildClass extends ParentClass { public $foo { get => parent::$foo::get(); } } (new ParentClass)->foo; (new ChildClass)->foo;
Output for git.master, git.master_jit
__get(foo) was called Fatal error: Uncaught Error: Undefined property ParentClass::$foo in /in/Y27mB:13 Stack trace: #0 /in/Y27mB(18): ChildClass->$foo::get() #1 {main} thrown in /in/Y27mB on line 13
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:
138.61 ms | 999 KiB | 7 Q