<?php function getClass(ReflectionType $type) { if ($type instanceof ReflectionNamedType) { if (!in_array($type->getName(), ['array', /* further predefined types */], true)) { return $type->getName(); } } return null; } function foo(array $array) {} $rf = new ReflectionFunction('foo'); $rp = $rf->getParameters()[0]; var_dump(isClass($rp->getType()));
You have javascript disabled. You will not be able to edit any code.