An interface can extend another interface in the same way that a class can extend another class
Interface IBar {
    public function method3();
}

Interface IArray {
    public function method2();
}

Interface IFoo extends IBar, IArray {
    public function method1();
}

class class1 implements IFoo {
    public function method1() {
        
    }
    public function method2() {
        
    }
    // public function method3() {
        
    // }
}
Class
class1
implements
IFoo
interface which extends other two interfaces itself. Because the class has not implemented
method3
method (commented), then the following error will be generated:
Fatal error:  Class class1 contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (IBar::method3)
by Valeri Tandilashvili
4 years ago
PHP
OOP
2
Pro tip: use ```triple backticks around text``` to write in code fences