ReflectionClass和ReflectionMethod 发表于 2020-12-11 更新于 2023-05-29 分类于 PHP , 基础 ReflectionClassReflectionMethod ReflectionClass 类报告了一个类的有关信息。 ReflectionMethod 类报告了一个方法的有关信息。 实例化 ReflectionMethod 的时候需要传入对象和方法两个参数。 通常 ReflectionMethod 可以作为参数传递到ReflectionClass的getMethod。来限制获取的方法类别。