src/UriNormalizer.php
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
    {
        return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
    }
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
    {
        return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
    }
public static function isEquivalent ( UriInterface $ uri1 , UriInterface $ uri2 , $ normalizations = self :: PRESERVING_NORMALIZATIONS ) { return ( string ) self :: normalize ( $ uri1 , $ normalizations ) === ( string ) self :: normalize ( $ uri2 , $ normalizations ) ; }
Whether two URIs can be considered equivalent.

Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also
accepts relative URI references and returns true when they are equivalent. This of course assumes they will be
resolved against the same base URI. If this is not the case, determination of equivalence or difference of
relative references does not mean anything.

@param UriInterface $uri1           An URI to compare
@param UriInterface $uri2           An URI to compare
@param int          $normalizations A bitmask of normalizations to apply, see constants

@return bool
@link https://tools.ietf.org/html/rfc3986#section-6.1
Whether two URIs can be considered equivalent .