3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function foobar(int $int, string $string, array $array, callable $callable, Test $object, $noType) { } } $r = new ReflectionMethod('Test', 'foobar'); foreach ($r->getParameters() as $param) { var_dump(array($param->name, $param->hasType(), $param->getType())); }

preferences:
54.36 ms | 404 KiB | 5 Q