• Interface contains only the declaration of methods.

  • If any class which implement this interface must contain the declared functions in it.

  • A class can use any interface by using the implements keyword.

  • Example :
    interface Interf
    public function display(); 
    class Demo implements Interf
    function show()
    echo "first method <br/>"; 
    public function display()
    echo "second method ";
    $obj=new Demo();
    Output :
    first method
    second method