3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class GP { public abstract mixed $foo { get; } } class P extends GP { public mixed $foo; public function x() { ++$this->foo; return $this; } } class C1 extends P { public mixed $foo = 0 { set { parent::$foo::set($value); } } } var_dump((new C1)->x());
Output for git.master_jit, git.master
object(C1)#1 (1) { ["foo"]=> int(1) }

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.91 ms | 493 KiB | 3 Q