public static function getReflection(callable $func): \ReflectionFunctionAbstract
    {
        if (is_string($func) && strpos($func, "::") !== false) {
            list($classname, $method) = explode("::", $func, 2);
            $rc = new \ReflectionClass($classname);
            return $rc->getMethod($method);
        }
        return new \ReflectionFunction($func);
    }
public static function getReflection(callable $func): \ReflectionFunctionAbstract
    {
        if (is_string($func) && strpos($func, "::") !== false) {
            list($classname, $method) = explode("::", $func, 2);
            $rc = new \ReflectionClass($classname);
            return $rc->getMethod($method);
        }
        return new \ReflectionFunction($func);
    }
public static function getReflection ( callable $ func ) : \ ReflectionFunctionAbstract { if ( is_string ( $ func ) && strpos ( $ func , "::" ) !== false ) { list ( $ classname , $ method ) = explode ( "::" , $ func , 2 ) ; $ rc = new \ ReflectionClass ( $ classname ) ; return $ rc -> getMethod ( $ method ) ; } return new \ ReflectionFunction ( $ func ) ; }
Get a reflection object for a function or static method

@param callable $func The function to reflect
@return \ReflectionFunctionAbstract
@throws \ReflectionException If `$func` does not exist
Get a reflection object for a function or static method