dongyan7950 2013-04-24 02:28
浏览 21

PHP:按类分组的所有函数列表

I am looking for a way to get a list of all the php functions but needed them group by the class they exist in. Not sure if there is a way to get this from PHP docs or if its built into PHP. I am really only looking for built in / popular classes, so a custom mysqli class I dont care about but the mysql library that can be installed with PHP I do need.

Thank you very much

  • 写回答

1条回答 默认 最新

  • duanfang7757 2013-04-24 02:32
    关注

    Try this:

    foreach(get_declared_classes() as $classname) {
        echo $classname . PHP_EOL;
        $class = new ReflectionClass($classname);
        foreach($class->getMethods() as $m) {
            echo '  ' . $m->name . PHP_EOL;
        }
    }
    

    I'm using get_declared_classes() to get a list of all declared classes. Then I create a ReflectionClass object from them and iterate throught their methods.

    评论

报告相同问题?

悬赏问题

  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥170 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果