<?php class Foo { public function func() { echo 'I am the parent'; } } class Bar extends Foo { public function func() { echo 'I am the child'; } } // Create instance of child class $bar = new Bar; // Create reflection class $reflected = new ReflectionClass(get_class($bar)); // Get parent method $method = $reflected->getParentClass()->getMethod('func'); // Invoke method on child object $method->invokeArgs($bar, []);
You have javascript disabled. You will not be able to edit any code.