public function compareTo($url, $caseSensitive = true, $includeQuery = false, $ignoreSpecialChars = false)
    {
        /* @var $urlObj Url */
        $urlObj  = $url instanceof Url ? $url : self::create($url)->decodePath();
        /* @var $urlObj2 Url */
        $urlObj2 = clone $this;
        $urlObj2->decodePath();
        if ($ignoreSpecialChars) {
            $urlObj->tidy();
            $urlObj2->tidy();
        }
        if (!$includeQuery) {
            $urlObj->parameters  = [];
            $urlObj2->parameters = [];
        }
        return $caseSensitive ? strcmp($urlObj, $urlObj2) : strcasecmp($urlObj, $urlObj2);
    }