original_string: public function diff($rights)
      {
          $rlist = array_diff(str_split($rights), array_keys($this->_virtual));
  
          return array(
              'added' => implode('', array_diff($rlist, $this->_rights)),
              'removed' => implode('', array_diff($this->_rights, $rlist))
          );
      }
code: public function diff($rights)
      {
          $rlist = array_diff(str_split($rights), array_keys($this->_virtual));
  
          return array(
              'added' => implode('', array_diff($rlist, $this->_rights)),
              'removed' => implode('', array_diff($this->_rights, $rlist))
          );
      }
code_tokens: public function diff ( $ rights ) { $ rlist = array_diff ( str_split ( $ rights ) , array_keys ( $ this -> _virtual ) ) ; return array ( 'added' => implode ( '' , array_diff ( $ rlist , $ this -> _rights ) ) , 'removed' => implode ( '' , array_diff ( $ this -> _rights , $ rlist ) ) ) ; }
docstring: Computes the difference to another rights string.
  Virtual rights are ignored.
  
  @param string $rights  The rights to compute against.
  
  @return array  Two element array: added and removed.
docstring_tokens: Computes the difference to another rights string . Virtual rights are ignored .