相关疑难解决方法(0)

获取扩展类的文件名

假设我有两个文件,每个文件都有一个类.如何在父类中获取子类所在的文件名?

文件2(子类):

class B extends A{

}
Run Code Online (Sandbox Code Playgroud)

档案1:

class A{

  final protected function __construct(){
    // here I want to get the filename where class B is, 
    // or whatever class is the child
  }

}
Run Code Online (Sandbox Code Playgroud)

php class

9
推荐指数
1
解决办法
2770
查看次数

标签 统计

class ×1

php ×1