public static function isSameDocument($uri, $base_uri): bool
    {
        $uri = self::normalize($uri);
        $base_uri = self::normalize($base_uri);

        return (string) $uri->withFragment($uri instanceof Psr7UriInterface ? '' : null)
            === (string) $base_uri->withFragment($base_uri instanceof Psr7UriInterface ? '' : null);
    }
public static function isSameDocument($uri, $base_uri): bool
    {
        $uri = self::normalize($uri);
        $base_uri = self::normalize($base_uri);

        return (string) $uri->withFragment($uri instanceof Psr7UriInterface ? '' : null)
            === (string) $base_uri->withFragment($base_uri instanceof Psr7UriInterface ? '' : null);
    }
public static function isSameDocument ( $ uri , $ base_uri ) : bool { $ uri = self :: normalize ( $ uri ) ; $ base_uri = self :: normalize ( $ base_uri ) ; return ( string ) $ uri -> withFragment ( $ uri instanceof Psr7UriInterface ? '' : null ) === ( string ) $ base_uri -> withFragment ( $ base_uri instanceof Psr7UriInterface ? '' : null ) ; }
Tell whether both URI refers to the same document.

@param Psr7UriInterface|UriInterface $uri
@param Psr7UriInterface|UriInterface $base_uri
Tell whether both URI refers to the same document .