php 抽象类扩展另一个抽象类
2022-08-30 11:54:12
在 PHP 中,抽象类是否有可能从抽象类继承?
例如
abstract class Generic {
abstract public function a();
abstract public function b();
}
abstract class MoreConcrete extends Generic {
public function a() { do_stuff(); }
abstract public function b(); // I want this not to be implemented here...
}
class VeryConcrete extends MoreConcrete {
public function b() { do_stuff(); }
}
( 抽象类在php中扩展抽象类?不给出答案)