public static function getUserWebBrowserName($withVersion = false)
    {
        $info = self::getUserWebBrowserInfo();

        $knownBrowsers = [
            'Firefox/([\d\.]+)$' => 'Mozilla Firefox',
            'OPR/([\d\.]+)$'     => 'Opera',
            'Chrome/([\d\.]+)$'  => 'Google Chrome',
            'Safari/([\d\.]+)$'  => 'Apple Safari',
        ];

        foreach ($knownBrowsers as $pattern => $browserName) {
            $matches = [];
            $matchCount = preg_match(sprintf('|%s|', $pattern), $info, $matches);

            if ($matchCount > 0) {
                if ($withVersion) {
                    $version = $matches[1];

                    return sprintf('%s %s', $browserName, $version);
                }

                return $browserName;
            }
        }

        return '';
    }