3v4l.org

run code in 300+ PHP versions simultaneously
<?php //file testWorks.php interface IStringable1 { public function toString(); } class MyTestWorks1 implements IStringable1 { public function toString($a = '', $b = NULL) { echo "My Test is instantiated", PHP_EOL; } } $obj = new MyTestWorks1(); $obj->toString(); //file testBroken.php interface IStringable2 { public function toString(); } trait TStringable2 { public function toString($a = '', $b = NULL) { echo "My Test is instantiated", PHP_EOL; } } class MyTestWorks2 implements IStringable2{ use TStringable2; } $obj = new MyTestWorks2(); $obj->toString();
Output for git.master, git.master_jit, rfc.property-hooks
My Test is instantiated My Test is instantiated

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