3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function poop (self $a): self { } } $refMethod = new ReflectionMethod('Foo', 'poop'); $refParam = $refMethod->getParameters()[0]; print_r(array( 'paramType' => $refParam->getType()->getName(), 'returnType' => $refMethod->getReturnType()->getName(), ));

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.83 ms | 1139 KiB | 11 Q