How to get the name of the class that caused the action in the parent class?
Example:
class ParentClass { function action() { echo $className; } } class ChildClass extends ParentClass {} $parentClass = new ParentClass(); $parentClass->action(); // ParentClass $childClass = new ChildClass(); $childClass->action(); // ChildClass