public function xorBits(self $other) : void
    {
        $bitsLength = count($this->bits);
        $otherBits  = $other->getBitArray();

        if ($bitsLength !== count($otherBits)) {
            throw new InvalidArgumentException('Sizes don\'t match');
        }

        for ($i = 0; $i < $bitsLength; ++$i) {
            $this->bits[$i] = $this->bits[$i] ^ $otherBits[$i];
        }
    }
public function xorBits(self $other) : void
    {
        $bitsLength = count($this->bits);
        $otherBits  = $other->getBitArray();

        if ($bitsLength !== count($otherBits)) {
            throw new InvalidArgumentException('Sizes don\'t match');
        }

        for ($i = 0; $i < $bitsLength; ++$i) {
            $this->bits[$i] = $this->bits[$i] ^ $otherBits[$i];
        }
    }
public function xorBits ( self $ other ) : void { $ bitsLength = count ( $ this -> bits ) ; $ otherBits = $ other -> getBitArray ( ) ; if ( $ bitsLength !== count ( $ otherBits ) ) { throw new InvalidArgumentException ( 'Sizes don\'t match' ) ; } for ( $ i = 0 ; $ i < $ bitsLength ; ++ $ i ) { $ this -> bits [ $ i ] = $ this -> bits [ $ i ] ^ $ otherBits [ $ i ] ; } }
Makes an exclusive-or comparision on the current bit array.

@throws InvalidArgumentException if sizes don't match
Makes an exclusive - or comparision on the current bit array .