public static function compare(Rule $a, Rule $b, bool $checkTag = false): int
    {
        return Symbol::compare($a->subject, $b->subject)
            ?: Symbol::compareList($a->definition, $b->definition)
                ?: ($b->eof - $a->eof)
                    ?: ($checkTag ? self::compareTag($a->tag, $b->tag) : 0);
    }
public static function compare(Rule $a, Rule $b, bool $checkTag = false): int
    {
        return Symbol::compare($a->subject, $b->subject)
            ?: Symbol::compareList($a->definition, $b->definition)
                ?: ($b->eof - $a->eof)
                    ?: ($checkTag ? self::compareTag($a->tag, $b->tag) : 0);
    }
public static function compare ( Rule $ a , Rule $ b , bool $ checkTag = false ) : int { return Symbol :: compare ( $ a -> subject , $ b -> subject ) ? : Symbol :: compareList ( $ a -> definition , $ b -> definition ) ? : ( $ b -> eof - $ a -> eof ) ? : ( $ checkTag ? self :: compareTag ( $ a -> tag , $ b -> tag ) : 0 ) ; }
Compare two rules

Rules are equal when its' subject symbols, definition lists and EOF marker are equal.
Equality of tags is not required by default, and is under control of `$checkTag` argument.
@param Rule $a
@param Rule $b
@param bool $checkTag [since 1.3.0] Whether to check tags too.
Default is false to ignore tags
@return int Returns 0 when rules are equal
Compare two rules