3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(): iterable { return []; } function bar(): iterable|bool { return []; } echo (new ReflectionFunction('foo'))->getReturnType()->__toString(); echo ", "; echo (new ReflectionFunction('bar'))->getReturnType()->__toString();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
147.88 ms | 3347 KiB | 8 Q