3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { function func() { echo " Base"; } function parent() { echo " None"; } } class Extended extends Base { function Func() { echo " Extended"; } function Parent() { echo parent::func(); } } class Extended2 extends Extended { function func() { echo " Extended2"; } function parent() { echo parent::Func(); } function grandpa() { echo parent::parent(); } } $var1 = new Base(); $var2 = new Extended(); $var3 = new Extended2(); $var1->func(); $var2->func(); $var3->func(); $var2->parent(); $var3->parent(); $var3->grandpa();
Output for git.master, git.master_jit, rfc.property-hooks
Base Extended Extended2 Base Extended Base

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