我将尝试通过代码解释我的问题:
class A extends masterClass
{
function api()
{
die(__CLASS__);
/* rest of the code here ... */}
}
class B extends A
{
/* rest of the code here ... */
}
$obj = new B();
$obj->api(); // Should be "B" (name of last child class)
对此有什么“最佳”解决方案吗? 谢谢