2013-04-22 2 views
0
<?php 
class Testing 
{ 
    final public static function foo() 
    { 
     return; 
    } 
    public function bar() 
    { 
     return; 
    } 
} 

$foo = new ReflectionMethod('Testing', 'foo'); 

echo "Modifiers for method foo():\n"; 
echo $foo->getModifiers() . "\n"; 
echo implode(' ', Reflection::getModifierNames($foo->getModifiers())) . "\n"; 

$bar = new ReflectionMethod('Testing', 'bar'); 

echo "Modifiers for method bar():\n"; 
echo $bar->getModifiers() . "\n"; 
echo implode(' ', Reflection::getModifierNames($bar->getModifiers())); 
?> 

는 PHP 매뉴얼에 예제 # 1 ReflectionMethod::getModifiers() 예를 촬영 PHP에서 getModifiers()을 이해하려고 노력 : http://php.net/manual/en/reflectionmethod.getmodifiers.php코드 위

질문 : 코드 : $foo->getModifiers(), 출력은 261입니다, 이것은 무엇을 의미합니까?

답변

관련 문제