<?php

declare(strict_types=1);

namespace apexl\Utils\Class;

class ClassBasename
{
    public static function classBasename(object|string $class): string
    {
        if (is_object($class)) {
            $class = $class::class;
        }

        $array = explode('\\', $class);

        return array_pop($array);
    }
}
