3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I1 { public function fromThing(ThingA $thing): I1; } interface I2 { public function fromThing(ThingB $thing): I2; } class ThingA {} class ThingB {} class Impl implements I1, I2 { public function fromThing(ThingA|ThingB $thing): I1&I2 { return new self(); } } $i = new Impl();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
164.71 ms | 1542 KiB | 10 Q