2011-09-22 50 views

回答

6
+0

这是如何工作的?该链接指向ReflectionClass :: getStaticPropertyValue,但这是属性而不是方法。它应该链接到这里:http://php.net/manual/en/reflectionmethod.isstatic.php但它没有例子,我不知道它是如何工作的。 –

+0

想通了。添加一个新的答案。 –

+0

$ method = new ReflectionMethod('NameOfClass','nameOfMethod'); $ isStatic = $ method-> isStatic(); –

7

下面是关于如何使用ReflectionMethod更加清楚一点办法:

$MethodChecker = new ReflectionMethod($ClassName,$MethodName); 
var_dump($MethodChecker->isStatic()); 
相关问题