public function equals(RDN $other): bool
    {
        // if attribute count doesn't match
        if (count($this) != count($other)) {
            return false;
        }
        $attribs1 = $this->_attribs;
        $attribs2 = $other->_attribs;
        // if there's multiple attributes, sort using SET OF rules
        if (count($attribs1) > 1) {
            $attribs1 = self::fromASN1($this->toASN1())->_attribs;
            $attribs2 = self::fromASN1($other->toASN1())->_attribs;
        }
        for ($i = count($attribs1) - 1; $i >= 0; --$i) {
            $tv1 = $attribs1[$i];
            $tv2 = $attribs2[$i];
            if (!$tv1->equals($tv2)) {
                return false;
            }
        }
        return true;
    }
public function equals(RDN $other): bool
    {
        // if attribute count doesn't match
        if (count($this) != count($other)) {
            return false;
        }
        $attribs1 = $this->_attribs;
        $attribs2 = $other->_attribs;
        // if there's multiple attributes, sort using SET OF rules
        if (count($attribs1) > 1) {
            $attribs1 = self::fromASN1($this->toASN1())->_attribs;
            $attribs2 = self::fromASN1($other->toASN1())->_attribs;
        }
        for ($i = count($attribs1) - 1; $i >= 0; --$i) {
            $tv1 = $attribs1[$i];
            $tv2 = $attribs2[$i];
            if (!$tv1->equals($tv2)) {
                return false;
            }
        }
        return true;
    }
public function equals ( RDN $ other ) : bool { // if attribute count doesn't match if ( count ( $ this ) != count ( $ other ) ) { return false ; } $ attribs1 = $ this -> _attribs ; $ attribs2 = $ other -> _attribs ; // if there's multiple attributes, sort using SET OF rules if ( count ( $ attribs1 ) > 1 ) { $ attribs1 = self :: fromASN1 ( $ this -> toASN1 ( ) ) -> _attribs ; $ attribs2 = self :: fromASN1 ( $ other -> toASN1 ( ) ) -> _attribs ; } for ( $ i = count ( $ attribs1 ) - 1 ; $ i >= 0 ; -- $ i ) { $ tv1 = $ attribs1 [ $ i ] ; $ tv2 = $ attribs2 [ $ i ] ; if ( ! $ tv1 -> equals ( $ tv2 ) ) { return false ; } } return true ; }
Check whether RDN is semantically equal to other.

@param RDN $other Object to compare to
@return bool
Check whether RDN is semantically equal to other .