3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Other\Hierarchy\TheOtherNamespace; $a = function(\Some\Random\NS $b) { }; $b = function(TheOtherNamespace $c) { }; $handlers = [$b, $a]; foreach ($handlers as $handler) { $r = new ReflectionFunction($handler); $p = $r->getParameters(); var_dump($p[0]); var_dump($p[0]->getClass()); }

preferences:
39.4 ms | 402 KiB | 5 Q