【发布时间】:2014-02-28 08:46:56
【问题描述】:
在 php 中是否可以在不创建新对象的情况下获取接口名称?例如:
interface my_interface{}
abstract class foo implements my_interface{
public static function get_interface(){
// here return name of interface
}
}
class bar extends foo{}
echo bar::get_interface();
预期输出:
my_interface
【问题讨论】:
标签: php function oop interface abstract-class