original_string: protected function compare($a, $b, $operator)
      {
          settype($a, 'array');
          settype($b, 'array');
  
          if (in_array($operator, array('>=', '<=', '>', '<'))) {
              $a = reset($a);
              $b = reset($b);
          }
  
          switch ($operator) {
              case '>=':
                  return $a >= $b;
              case '<=':
                  return $a <= $b;
              case '>':
                  return $a > $b;
              case '<':
                  return $a < $b;
              case '=':
                  return count(array_intersect($a, $b)) > 0;
              case '!=':
                  return count(array_intersect($a, $b)) == 0;
          }
  
          return false;
      }
code: protected function compare($a, $b, $operator)
      {
          settype($a, 'array');
          settype($b, 'array');
  
          if (in_array($operator, array('>=', '<=', '>', '<'))) {
              $a = reset($a);
              $b = reset($b);
          }
  
          switch ($operator) {
              case '>=':
                  return $a >= $b;
              case '<=':
                  return $a <= $b;
              case '>':
                  return $a > $b;
              case '<':
                  return $a < $b;
              case '=':
                  return count(array_intersect($a, $b)) > 0;
              case '!=':
                  return count(array_intersect($a, $b)) == 0;
          }
  
          return false;
      }
code_tokens: protected function compare ( $ a , $ b , $ operator ) { settype ( $ a , 'array' ) ; settype ( $ b , 'array' ) ; if ( in_array ( $ operator , array ( '>=' , '<=' , '>' , '<' ) ) ) { $ a = reset ( $ a ) ; $ b = reset ( $ b ) ; } switch ( $ operator ) { case '>=' : return $ a >= $ b ; case '<=' : return $ a <= $ b ; case '>' : return $ a > $ b ; case '<' : return $ a < $ b ; case '=' : return count ( array_intersect ( $ a , $ b ) ) > 0 ; case '!=' : return count ( array_intersect ( $ a , $ b ) ) == 0 ; } return false ; }
docstring: Compare two values using an operator
  @param mixed $a
  @param mixed $b
  @param string $operator
  @return boolean
docstring_tokens: Compare two values using an operator