PHP5接口和PHP5抽象类的语法介绍
程序员文章站
2023-12-24 09:38:33
...
大家对具体PHP5抽象类的代码如下:
- abstract class AbstractClass {
- abstract public function test();
- }
- class ImplementedClass extends AbstractClass {
- public function test() {
- echo "ImplementedClass::test() called. ";
- }
- }
- $o = new ImplementedClass;