public static function check_edge_version($version = null) {
        $useragent = self::get_user_agent_string();

        if ($useragent === false) {
            // No User Agent found.
            return false;
        }

        if (strpos($useragent, 'Edge/') === false) {
            // Edge was not found in the UA - this is not Edge.
            return false;
        }

        if (empty($version)) {
            // No version to check.
            return true;
        }

        // Find the version.
        // Edge versions are always in the format:
        //      Edge/<version>.<OS build number>
        preg_match('%Edge/([\d]+)\.(.*)$%', $useragent, $matches);

        // Just to be safe, round the version being tested.
        // Edge only uses integer versions - the second component is the OS build number.
        $version = round($version);

        // Check whether the version specified is >= the version found.
        return version_compare($matches[1], $version, '>=');
    }