3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fruit {} class Banana extends Fruit {} class Lemon extends Fruit {} class Base { public function methodOne(Banana $x) {} public function methodTwo(array $x) {} } class OverrideNullable extends Base { public function methodOne(Banana $x = null) {} public function methodTwo(array $x = null) {} } class OverrideParent extends Base { public function methodOne(Fruit $x) {} } class OverrideWildcard extends Base { public function methodOne($x) {} public function methodTwo($x) {} } (new Base())->methodOne(new Banana()); (new Base())->methodTwo([]); (new OverrideNullable())->methodOne(); (new OverrideNullable())->methodTwo(); (new OverrideParent())->methodOne(new Lemon()); (new OverrideWildcard())->methodOne(''); (new OverrideWildcard())->methodTwo(''); echo "Output intentionally left blank." , PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
Output intentionally left blank.

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