ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾PHP ±à³Ì£¾PHP 5 Power programming
Team LiB
Previous Section Next Section

3.14. Inheritance of Interfaces

Interfaces may inherit from other interfaces. The syntax is similar to that of classes, but allows multiple inheritance:

interface I1 extends I2, I3, ... {
    ...
}

Similar to when classes implement interfaces, an interface can only extend other interfaces if they don't clash with each other (which means that you receive an error if I2 defines methods or constants already defined by I1).

    Team LiB
    Previous Section Next Section