3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass {} interface TestCon { public function testCon(MyClass $object): object; } class TestConImplementation implements TestCon { public function testCon(object $object): object { return $object; } } $test = new TestConImplementation; $object = $test->testCon(new MyClass); var_dump($object);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
159.16 ms | 2120 KiB | 9 Q