Using ReflectionClass::getFileName with this will get you the dirname the class Child
is defined on.
$reflector = new ReflectionClass("Child");
$fn = $reflector->getFileName();
return dirname($fn);
You can get the class name of an object with get_class() :)