$myObject = new MyClass(); $className = CRM_Utils_System::getClassName($myObject); echo "The class name is: " . $className; // output: "The class name is: MyClass"
$className = CRM_Utils_System::getClassName('MyClass'); echo "The class name is: " . $className; // output: "The class name is: MyClass"Package/library: This function is part of the CiviCRM package/library.