Abstract classes
Last updated
What is Abstract classes?
Abstract classes in PHP are those which cannot be instantiated on their own. They are simply blueprints for other classes, providing a predefined structure. By declaring a class as abstract, you can define methods without having to implement them. Subsequent classes, when inheriting from an abstract class, must implement these undefined methods.
Free resources to learn Abstract classes
- Official docsAbstract Classes
More in stage 12: PHP-FIG
Abstract classes: common questions
Can I learn Abstract classes in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Abstract classes in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Abstract classes tutorial for beginners?
It is lesson 84 of 120 in the free PHP roadmap, in stage 12, PHP-FIG. If you are new to PHP, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.