3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(int $a, Foo $b, $c) { } $r = new ReflectionFunction('f'); foreach ($r->getParameters() as $p) { echo $p, "\n"; if ($p->hasType()) { echo $p->getType(); var_dump($p->getType()); } }

preferences:
51.41 ms | 402 KiB | 5 Q