3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait A { function test(ArrayObject $a){ echo "hello A"; } function testA(){ $this->test(new ArrayObject); } } trait B { function test(SplFixedArray $b){ echo "hello B"; } function testB(){ $this->test(new SplFixedArray); } } class C { use A, B{ A::test insteadof B; } } (new C)->testA(); (new C)->testB();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
183.71 ms | 2722 KiB | 8 Q