Home > Backend Development > PHP Tutorial > PHP中的接口

PHP中的接口

WBOY
Release: 2016-06-23 14:31:44
Original
853 people have browsed it

php与C#一样不支持多重继承,但可以用接口来实现多重继承的功能.

接口:接口的思想是指定一个实现了该接口的类必须实现接口中定义的一系列函数.接口定义了一组行为规范.

1)使用implements关键字实现接口,跟Objective-c一样.


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template