2011-09-22 11 views

risposta

6
+0

Come funziona? Il collegamento punta a ReflectionClass :: getStaticPropertyValue ma è per le proprietà non per i metodi. Dovrebbe collegarsi qui: http://php.net/manual/en/reflectionmethod.isstatic.php ma non ha esempi e non riesco a capire come funziona. –

+0

Capito. Aggiungere una nuova risposta. –

+0

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

7

Ecco un po 'più chiaro su come utilizzare ReflectionMethod:

$MethodChecker = new ReflectionMethod($ClassName,$MethodName); 
var_dump($MethodChecker->isStatic()); 
Problemi correlati