0PricingLogin
PHP Academy · Lesson

Abstract Classes and Methods

Define partially implemented base classes with abstract keywords.

Intro: Abstract Classes

An abstract class cannot be instantiated directly — it's a template. Abstract methods declare a signature with no implementation; subclasses must provide them.

Key Concepts

Key concepts:

  • Declared with abstract class
  • Abstract methods have no body: abstract public function x();
  • Subclasses must implement all abstract methods
  • Can contain both abstract and concrete methods

All lessons in this course

  1. Extending Classes with Inheritance
  2. Abstract Classes and Methods
  3. Implementing Interfaces
  4. Traits for Code Reuse
← Back to PHP Academy