假设我有两个文件,每个文件都有一个类.如何在父类中获取子类所在的文件名?
文件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)