Is there a way to define a child instance in a parent class in PHP? Say we have this code:
class Parent { public function InstanceOfChild() {
I need to do (if possible) the create InstanceOfChild() ) method, which will tell me an instance of the child class, because many classes can be children from my parent, but I want (let us say) the log that the child calls which methods. Thanks for the help!
source share