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();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
169.47 ms | 2700 KiB | 10 Q