The main advantage of the interface is that it allows you to determine the protocol that will be implemented so that the object has some kind of behavior. For example, you might have a Comparable interface with a comparison method for classes to implement, and each class that implements it will have a standardized comparison method.
. , , , :
abstract class Animal {
abstract protected function eat();
abstract protected function sleep();
public function die() {
}
}
eat() sleep() , (, , ..), Animal -. ( ), . 1.) , Animal, 2.) Animal s. , Animal die().