(non-PHPdoc)
@see \SGH\Comparable\Comparator::compare()
181070
public function compare($object1, $object2)
    {
        if (! is_object($object1)) {
            throw new ComparatorException('$object1 ("' . $object1 . '") is not an object.');
        }
        if (! is_object($object2)) {
            throw new ComparatorException('$object2 ("' . $object2 . '") is not an object.');
        }
        return strcmp(spl_object_hash($object1), spl_object_hash($object2));
    }
1202898
protected function compare(string $a, string $b): int
    {
        global $sortOrder;

        $aIndex = array_search($a, $sortOrder);
        $bIndex = array_search($b, $sortOrder);
        if ($aIndex === false) {
            return -1;
        }

        if ($bIndex === false) {
            return 1;
        }

        return $aIndex - $bIndex;
    }
795218
private function compareValues($value, array $comparisons)
    {
        foreach ($comparisons as $comparison) {
            if (0 === strcasecmp($value, $comparison)) {
                return true;
            }
        }

        return false;
    }
350919
function CompareTo( $obj )
	{
		if ( ! $obj instanceof TimeValue )
			throw new ArgumentException("$obj");

		/**
		 * @var TimeValue $other
		 */
		$other = $obj;
		return $this->Value == $other->Value
			? 0
			: ( $this->Value > $other->Value ? 1 : -1 );
	}
320396
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof NumberNode)) {
            return false;
        }

        return $this->getValue() == $other->getValue();
    }
437788
public static function compare($version)
    {
        $currentVersion = str_replace(' ', '', strtolower(self::VERSION));
        $version        = str_replace(' ', '', $version);

        return version_compare($version, $currentVersion);
    }
466928
public static function compare(string $a, string $b): string
    {
        return static::makeBin($a, 16) === static::makeBin($b, 16);
    }
290626
public function compare($a, $b)
    {
        return strcoll(Horde_String::lower($a[$this->key], true, 'UTF-8'), Horde_String::lower($b[$this->key], true, 'UTF-8'));
    }
893651
public function compare($a, $b)
    {
        if ($this->collator instanceof \Collator) {
            return $this->collator->compare($a, $b);
        } else {
            return $a == $b ? 0 : ($a > $b ? 1 : -1);
        }
    }
364705
public function equals ($other)
	{
		ensure('Argument', $other, 'is_a_string', __CLASS__, __METHOD__);

		if ($other instanceof self) {
			return $other->to_s() === $this->string;
		}

		return $other === $this->string;
	}
1155253
public function compare(DecimalNumber $a, DecimalNumber $b)
    {
        if (function_exists('bccomp')) {
            return $this->compareUsingBcMath($a, $b);
        }

        return $this->compareWithoutBcMath($a, $b);
    }
170761
public function compareTo($other)
    {
        if ($other === null) {
            return false;
        }
        if (!($other instanceof PostfixOperatorNode)) {
            return false;
        }

        return $this->getOperator() == $other->getOperator();
    }
321506
protected function sort()
    {
        if (!$this->sorted) {
            uasort($this->items, [$this, 'compare']);
            $this->sorted = true;
        }
    }
1350523
public function walkComparison(Comparison $comparison)
    {
        $value    = $this->getValueFromComparison($comparison);
        $field    = $comparison->getField();
        $operator = $comparison->getOperator();

        if (($operator === Comparison::EQ || $operator === Comparison::IS) && $value === null) {
            return;
        } elseif ($operator === Comparison::NEQ && $value === null) {
            return;
        }

        $this->values[] = $value;
        $this->types[]  = [$field, $value, $operator];
    }
35708
public function equals($compare)
    {
        if ($compare instanceof self) {
            return ($compare->className === $this->className && $compare->methodName === $this->methodName);
        }
        
        return false;
    }
1198220
final public function compare($item1, $item2)
    {
        if (!$this->isReady()) {
            throw new \RuntimeException("The comparer is not ready, no valid callback has been set.");
        }

        return call_user_func_array($this->callback, [$item1, $item2, $this->options]);
    }
1241321
public function compare($strict = false)
    {
        $compare2 = $this->compare2;

        if (is_string($this->compare2)) {
            $compare2 = explode($this->separator, $this->compare2);

            $compare2 = array_map('trim', $compare2);
        }

        return CompareHelper::compare($this->compare1, $this->operator, $compare2, $strict);
    }