UrlCheck.php
/**
     * Indicates whether the hostname parts of url and base_url are equal.
     *
     * @param string $firstHost
     * @param string $secondHost
     * @return boolean
     */
Indicates whether the hostname parts of url and base_url are equal.
@param string $firstHost
@param string $secondHost
@return boolean
Indicates whether the hostname parts of url and base_url are equal . @param string $firstHost @param string $secondHost @return boolean
public static function areHostsEqual($firstHost, $secondHost)
    {
        $firstHost = parse_url($firstHost, PHP_URL_HOST);
        $secondHost = parse_url($secondHost, PHP_URL_HOST);
        if (is_null($firstHost) || is_null($secondHost)) {
            return false;
        }
        return ($firstHost === $secondHost);
    }
public static function areHostsEqual ( $ firstHost , $ secondHost ) { $ firstHost = parse_url ( $ firstHost , PHP_URL_HOST ) ; $ secondHost = parse_url ( $ secondHost , PHP_URL_HOST ) ; if ( is_null ( $ firstHost ) || is_null ( $ secondHost ) ) { return false ; } return ( $ firstHost === $ secondHost ) ; }
Indicates whether the hostname parts of url and base_url are equal.
Indicates whether the hostname parts of url and base_url are equal .