3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait X{ function tryA(A $a){ $this->test($a); } function test(A $a){} // can't solve signatures incompatibility... } trait Y{ function tryB(B $b){ $this->test($b); } function test(B $b){} // when arguments are different... } class LOL{ use X, Y{ X::test insteadof Y; // this doesn't actually solve anything... } } 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:
210.56 ms | 2508 KiB | 8 Q