2011-09-22 4 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()); 
관련 문제