3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ private $foo = 10; } class B extends A{ private $foo = 20; } var_dump(new B); class C{ private $foo = 10; } class D extends C{ private $foo = 20; function __debugInfo(){ $g = (array)$this; $g['moar'] = 1111; return $g; } } var_dump(new D);
Output for git.master, git.master_jit, rfc.property-hooks
object(B)#1 (2) { ["foo":"A":private]=> int(10) ["foo":"B":private]=> int(20) } object(D)#1 (3) { ["foo":"C":private]=> int(10) ["foo":"D":private]=> int(20) ["moar"]=> int(1111) }

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.59 ms | 1734 KiB | 4 Q