public static function className($input): string
    {
        $output = preg_replace(['#(?<=[^A-Z\s])([A-Z\s])#i'], ' $0', $input);
        $output = explode(' ', $output);

        $output = array_map(function ($item) {
            $item = preg_replace('#[^a-z0-9]#i', '', $item);
            $item = Filter::ucFirst($item);
            return $item;
        }, $output);

        $output = array_filter($output);

        return implode('', $output);
    }
public static function className($input): string
    {
        $output = preg_replace(['#(?<=[^A-Z\s])([A-Z\s])#i'], ' $0', $input);
        $output = explode(' ', $output);

        $output = array_map(function ($item) {
            $item = preg_replace('#[^a-z0-9]#i', '', $item);
            $item = Filter::ucFirst($item);
            return $item;
        }, $output);

        $output = array_filter($output);

        return implode('', $output);
    }
public static function className ( $ input ) : string { $ output = preg_replace ( [ '#(?<=[^A-Z\s])([A-Z\s])#i' ] , ' $0' , $ input ) ; $ output = explode ( ' ' , $ output ) ; $ output = array_map ( function ( $ item ) { $ item = preg_replace ( '#[^a-z0-9]#i' , '' , $ item ) ; $ item = Filter :: ucFirst ( $ item ) ; return $ item ; } , $ output ) ; $ output = array_filter ( $ output ) ; return implode ( '' , $ output ) ; }
Convert words to PHP Class name

@param $input
@return string
Convert words to PHP Class name