Answer the question
In order to leave comments, you need to log in
Stupid question about abstract classes?
Could you explain to me how abstract classes work directly in PHP?
Let's assume I have an abstract class Parent in which connection to a DB is carried out.
There are 10 child classes that inherit from Parent.
If I create 10 objects from each child class on the page, does that mean I will have 10 db connections?
Answer the question
In order to leave comments, you need to log in
If you create 10 objects from each of the 10 child classes, then you will have 100 connections.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question