public static function getClassDescription($identifier)
    {
        $identifierOctet = self::makeNumeric($identifier);

        if (self::isConstructed($identifierOctet)) {
            $classDescription = 'Constructed ';
        } else {
            $classDescription = 'Primitive ';
        }
        $classBits = $identifierOctet >> 6;
        switch ($classBits) {
            case self::CLASS_UNIVERSAL:
                $classDescription .= 'universal';
                break;
            case self::CLASS_APPLICATION:
                $classDescription .= 'application';
                break;
            case self::CLASS_CONTEXT_SPECIFIC:
                $tagNumber = self::getTagNumber($identifier);
                $classDescription = "[$tagNumber] Context-specific";
                break;
            case self::CLASS_PRIVATE:
                $classDescription .= 'private';
                break;

            default:
                return "INVALID IDENTIFIER OCTET: {$identifierOctet}";
        }

        return $classDescription;
    }
public static function getClassDescription($identifier)
    {
        $identifierOctet = self::makeNumeric($identifier);

        if (self::isConstructed($identifierOctet)) {
            $classDescription = 'Constructed ';
        } else {
            $classDescription = 'Primitive ';
        }
        $classBits = $identifierOctet >> 6;
        switch ($classBits) {
            case self::CLASS_UNIVERSAL:
                $classDescription .= 'universal';
                break;
            case self::CLASS_APPLICATION:
                $classDescription .= 'application';
                break;
            case self::CLASS_CONTEXT_SPECIFIC:
                $tagNumber = self::getTagNumber($identifier);
                $classDescription = "[$tagNumber] Context-specific";
                break;
            case self::CLASS_PRIVATE:
                $classDescription .= 'private';
                break;

            default:
                return "INVALID IDENTIFIER OCTET: {$identifierOctet}";
        }

        return $classDescription;
    }
public static function getClassDescription ( $ identifier ) { $ identifierOctet = self :: makeNumeric ( $ identifier ) ; if ( self :: isConstructed ( $ identifierOctet ) ) { $ classDescription = 'Constructed ' ; } else { $ classDescription = 'Primitive ' ; } $ classBits = $ identifierOctet >> 6 ; switch ( $ classBits ) { case self :: CLASS_UNIVERSAL : $ classDescription .= 'universal' ; break ; case self :: CLASS_APPLICATION : $ classDescription .= 'application' ; break ; case self :: CLASS_CONTEXT_SPECIFIC : $ tagNumber = self :: getTagNumber ( $ identifier ) ; $ classDescription = "[$tagNumber] Context-specific" ; break ; case self :: CLASS_PRIVATE : $ classDescription .= 'private' ; break ; default : return "INVALID IDENTIFIER OCTET: {$identifierOctet}" ; } return $ classDescription ; }
Returns a textual description of the information encoded in a given identifier octet.

The first three (most significant) bytes are evaluated to determine if this is a
constructed or primitive type and if it is either universal, application, context-specific or
private.

Example:
Constructed context-specific
Primitive universal

@param int|string $identifier

@return string
Returns a textual description of the information encoded in a given identifier octet .