2016-11-07 35 views

回答

1

如果使用了XDebug与原子时,请检查下面的XDebug设置:

xdebug.var_display_max_depth 
xdebug.var_display_max_children 
xdebug.var_display_max_data 

参见这篇文章:How to get xdebug var_dump to show full object/array

还有可能是在原子显示孩子的数量有限制。

-1

get_class_methods,只能获得公共函数

$class = new ReflectionClass($_brand); 
$methods = $class->getMethods(); 
var_dump($methods); 
-1

get_class_methods()是当前范围敏感,这意味着如果你这样做:

class brand{ 
    public function publicMethod(){} 
    private function privateMethod(){} 
    protected function protectedMethod(){} 

    static function getMethods(){ 
    return get_class_methods(__CLASS__); 
    } 
} 

print_r(brand::getMethods()); 

你会收到e公共,私人,受保护和静态方法的完整列表。

相关问题