Is there a way to override PHP __destruct in parent class from a child class

101 views Asked by At

I have declared a PHP magic function __destruct in child class, when an object from this child class is called it also calls the __destruct from the parent class in addition to the __destruct from the child class.

How do I make sure that only the __destruct in the child class is called. I do not want to use access modifiers too because I might be creating another child class.

0

There are 0 answers