3v4l.org

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

preferences:
39.4 ms | 402 KiB | 5 Q