public function sortedSet(): self
    {
        $obj = clone $this;
        usort($obj->_elements,
            function (Element $a, Element $b) {
                if ($a->typeClass() != $b->typeClass()) {
                    return $a->typeClass() < $b->typeClass() ? -1 : 1;
                }
                if ($a->tag() == $b->tag()) {
                    return 0;
                }
                return $a->tag() < $b->tag() ? -1 : 1;
            });
        return $obj;
    }
public function sortedSet(): self
    {
        $obj = clone $this;
        usort($obj->_elements,
            function (Element $a, Element $b) {
                if ($a->typeClass() != $b->typeClass()) {
                    return $a->typeClass() < $b->typeClass() ? -1 : 1;
                }
                if ($a->tag() == $b->tag()) {
                    return 0;
                }
                return $a->tag() < $b->tag() ? -1 : 1;
            });
        return $obj;
    }
public function sortedSet ( ) : self { $ obj = clone $ this ; usort ( $ obj -> _elements , function ( Element $ a , Element $ b ) { if ( $ a -> typeClass ( ) != $ b -> typeClass ( ) ) { return $ a -> typeClass ( ) < $ b -> typeClass ( ) ? - 1 : 1 ; } if ( $ a -> tag ( ) == $ b -> tag ( ) ) { return 0 ; } return $ a -> tag ( ) < $ b -> tag ( ) ? - 1 : 1 ; } ) ; return $ obj ; }
Sort by canonical ascending order.
Used for DER encoding of SET type.

@return self
Sort by canonical ascending order . Used for DER encoding of SET type .