What is abstract method and abstract class?
In PHP, an abstract class is one in which there is at least one abstract method. An abstract method is one that is declared as a method but not implemented in the code as the same.
Example
abstract class ParentClass {
abstract public function someMethod1();
abstract public function someMethod2($name, $color);
abstract public function someMethod3() : string;
}
Suggest An Answer
No suggestions Available!