3v4l.org

run code in 300+ PHP versions simultaneously
<? class Test { function AMethod($param) {echo $param*1;} function BMethod($param) {echo $param*2;} function CMethod($param) {echo $param*3;} } $obj = new Test(); $obj->{"A".Method}(1); $obj->{"B".Method}(2); $obj->{"C".Method}(3); $modulename1 = "A"; $modulename2 = "B"; $modulename3 = "C"; $obj->{$modulename1.Method}(1); $obj->{$modulename2.Method}(2); $obj->{$modulename3.Method}(3);
Output for git.master, git.master_jit, rfc.property-hooks
<? class Test { function AMethod($param) {echo $param*1;} function BMethod($param) {echo $param*2;} function CMethod($param) {echo $param*3;} } $obj = new Test(); $obj->{"A".Method}(1); $obj->{"B".Method}(2); $obj->{"C".Method}(3); $modulename1 = "A"; $modulename2 = "B"; $modulename3 = "C"; $obj->{$modulename1.Method}(1); $obj->{$modulename2.Method}(2); $obj->{$modulename3.Method}(3);

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:
35.73 ms | 402 KiB | 8 Q