3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function blah($param); } class Bar implements Foo { public function blah($param, $optional = null) { if (2 === func_num_args()) { return '2 params'; } return '1 param'; } } $bar = new Bar(); var_dump($bar->blah('aaa')); var_dump($bar->blah('aaa', 'bbb'));
Output for git.master, git.master_jit, rfc.property-hooks
string(7) "1 param" string(8) "2 params"

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:
45.17 ms | 1624 KiB | 4 Q