Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 接口可以扩展其他类吗?_Php_Oop_Inheritance_Interface - Fatal编程技术网

Php 接口可以扩展其他类吗?

Php 接口可以扩展其他类吗?,php,oop,inheritance,interface,Php,Oop,Inheritance,Interface,我在zend网站上找到了这个 interface ResultSetInterface extends \Traversable, \Countable { public function initialize($dataSource); public function getFieldCount(); } 接口是否可以扩展类?多重继承呢?我知道PHP不支持多重继承 有人能澄清这一点吗 来自文档 使用extends操作符可以像类一样扩展接口 它们只能扩展其他接口。接口可以扩展其

我在zend网站上找到了这个

interface ResultSetInterface extends \Traversable, \Countable
{
    public function initialize($dataSource);
    public function getFieldCount();
}
接口是否可以扩展类?多重继承呢?我知道PHP不支持多重继承

有人能澄清这一点吗

来自文档

使用extends操作符可以像类一样扩展接口


它们只能扩展其他接口。

接口可以扩展其他一个接口,但不能扩展其他类。对于多重继承,看看哪一个对我有意义。我是说你还想做些什么?伟大的