PHP get class name without namespace

Below is the simple function to get class name without namesapce.

public function getClassName() {
    $path = explode('\\', __CLASS__);
    return array_pop($path);

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems. Protection Status