Andoh Francis
Andoh Francis

Reputation: 1

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

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.

Upvotes: 0

Views: 133

Answers (0)

Related Questions