3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait X{ function tryA(A $a){ $this->test($a); } abstract function test(A $a); } trait Y{ function tryB(B $b){ $this->test($b); } abstract function test(B $b); } class LOL{ use X, Y; function test(A $a){} } class A{} class B{} $x = new LOL; $x->tryA(new A); $x->tryB(new B);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
153.67 ms | 2933 KiB | 8 Q