Get Browser version.

@since 1.0.0

@return void
18833
public function browserVersion()
    {
        $UserAgent = self::agent();
        $B_Agent = self::Browser()['agent'];
        if ($B_Agent !== null) {
            $known = ['Version', $B_Agent, 'other'];
            $pattern = '#(?<browser>'.implode('|', $known).
            ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
            if (!preg_match_all($pattern, $UserAgent, $matches)) {
            }
            $i = count($matches['browser']);
            if ($i != 1) {
                if (strripos($UserAgent, 'Version') < strripos($UserAgent, $B_Agent)) {
                    $Version = $matches['version'][0];
                } else {
                    $Version = $matches['version'][0];
                }
            } else {
                $Version = $matches['version'][0];
            }
        }

        return $Version;
    }
1215626
protected function getSafariVersionOnIos()
    {
        $aresult = explode('/', stristr($this->_agent, 'Version'));
        if (isset($aresult[1])) {
            $aversion = explode(' ', $aresult[1]);
            $this->setVersion($aversion[0]);
            return true;
        }
        return false;
    }
95530
protected function _getVersion()
    {
        if(empty($this->version))
        {
            $result = $this->cacheHandler->get($this->getTagName());
            if(empty($result)) {
                $this->ResetTagVersion();
            } else {
                $this->version = $result;
            }
        }
        return $this->version;
    }
764819
function get_plugin_version() {
            $this->_logger->entrance();

            $plugin_data = $this->get_plugin_data();

            $this->_logger->departure( 'Version = ' . $plugin_data['Version'] );

            return $this->apply_filters( 'plugin_version', $plugin_data['Version'] );
        }
704596
protected function getCurrentVersion()
    {
        $version = $this->getBinary()->run('--version');
        $version = str_replace('v', null, $version);

        return $version;
    }
284863
public function getVersion()
    {
        if (isset($this->version)) {
            return (string)$this->version;
        } else {
            OsDetector::detect($this, $this->getUserAgent());

            return (string)$this->version;
        }
    }
660403
public function getVersions()
    {
        $this->initLogTable();

        $query = $this->db->getQuery(true)
            ->select('version')
            ->from($this->db->quoteName($this->logTable))
            ->order('version ASC');

        return $this->db->setQuery($query)->loadColumn();
    }
1049082
protected function getVersionInfo()
	{
		if(YII_DEBUG)
		{
			$version='<a href="http://www.yiiframework.com/">Yii Framework</a>/'.Yii::getVersion();
			if(isset($_SERVER['SERVER_SOFTWARE']))
				$version=$_SERVER['SERVER_SOFTWARE'].' '.$version;
		}
		else
			$version='';
		return $version;
	}
87680
protected function get_version() {
        global $CFG;

        $plugin = new stdClass;
        require($CFG->dirroot . '/lib/editor/tinymce/plugins/' . $this->plugin . '/version.php');
        return $plugin->version;
    }
942156
public function getBrowserVersion($refresh = false)
    {
        if (empty($this->detection['browser']) || $refresh) {
            $this->detectBrowser($this->userAgent);
        }

        return $this->browserVersion;
    }
1360914
public function GetHttpVersion () {
		if ($this->httpVersion === NULL) {
			$server = & $this->request->GetGlobalCollection('server');
			$this->httpVersion = isset($server['SERVER_PROTOCOL'])
				? $server['SERVER_PROTOCOL']
				: 'HTTP/1.1';
		}
		return $this->httpVersion;
	}
1296403
function () {
		var version = 0;

		if ( this.chrome ) {
			version = navigator.userAgent.replace( /(.*chrome\/|safari.*)/gi, "" );
		}
		else if ( this.firefox ) {
			version = navigator.userAgent.replace( /(.*firefox\/)/gi, "" );
		}
		else if ( this.ie ) {
			version = navigator.userAgent.replace(/(.*msie|;.*)/gi, "");
		}
		else if ( this.opera ) {
			version = navigator.userAgent.replace( /(.*version\/|\(.*)/gi, "" );
		}
		else if ( this.safari ) {
			version = navigator.userAgent.replace( /(.*version\/|safari.*)/gi, "" );
		}
		else {
			version = navigator.appVersion || "0";
		}

		version = number.parse( string.trim( version ) );

		if ( isNaN( version ) ) {
			version = 0;
		}

		if ( this.ie && document.documentMode && document.documentMode < version ) {
			version = document.documentMode;
		}

		return version;
	}
543874
function version() {
        if ($this->version == null) {
            $this->version = intval($this->fetch(self::TR8N_VERSION_KEY, Config::instance()->configValue("cache.version", 1)));
        }
        return $this->version;
    }
495279
public function whichBrowser()
    {
        $result = [
            'browser' =>  $this->getBrowserDetector()->getName(),
            'browserVersion' => $this->getBrowserDetector()->getVersion(),
            'os' => $this->getOsDetector()->getName(),
            'osVersion' => $this->getOsDetector()->getVersion()
        ];
        $this->returnJson($result);
    }
567302
public static function get_browser_info() {
        $u_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'UNKNOWN';
        $bname = 'Unknown';
        $platform = 'Unknown';
        $ub = 'Unknown';
        $version = "";
        //First get the platform?
        if (preg_match('/linux/i', $u_agent)) {
            $platform = 'linux';
        } elseif (preg_match('/macintosh|mac os x/i', $u_agent)) {
            $platform = 'mac';
        } elseif (preg_match('/windows|win32/i', $u_agent)) {
            $platform = 'windows';
        }
        // Next get the name of the useragent yes seperately and for good reason
        if (preg_match('/MSIE/i', $u_agent) && !preg_match('/Opera/i', $u_agent)) {
            $bname = 'Internet Explorer';
            $ub = "MSIE";
        } elseif (preg_match('/Firefox/i', $u_agent)) {
            $bname = 'Mozilla Firefox';
            $ub = "Firefox";
        } elseif (preg_match('/Chrome/i', $u_agent)) {
            $bname = 'Google Chrome';
            $ub = "Chrome";
        } elseif (preg_match('/Safari/i', $u_agent)) {
            $bname = 'Apple Safari';
            $ub = "Safari";
        } elseif (preg_match('/Opera/i', $u_agent)) {
            $bname = 'Opera';
            $ub = "Opera";
        } elseif (preg_match('/Netscape/i', $u_agent)) {
            $bname = 'Netscape';
            $ub = "Netscape";
        }
        // finally get the correct version number
        $known = [
            'Version',
            $ub,
            'other'
        ];
        $pattern = '#(?<browser>' . join('|', $known) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
        if (!preg_match_all($pattern, $u_agent, $matches)) {
            // we have no matching number just continue

        } else {
            // see how many we have
            $i = count($matches['browser']);
            if ($i != 1) {
                //we will have two since we are not using 'other' argument yet
                //see if version is before or after the name
                if (strripos($u_agent, "Version") < strripos($u_agent, $ub)) {
                    $version = $matches['version'][0];
                } else {
                    $version = $matches['version'][1];
                }
            } else {
                $version = $matches['version'][0];
            }
        }
        // check if we have a number
        if ($version == null || $version == "") {
            $version = "?";
        }

        return [
            'user_agent' => $u_agent,
            'name' => $bname,
            'version' => $version,
            'platform' => $platform,
            'pattern' => $pattern
        ];
    }
728031
private function getServerVersion()
    {
        $connection = $this->getWrappedConnection();

        // Automatic platform version detection.
        if ($connection instanceof ServerInfoAwareConnection && ! $connection->requiresQueryForServerVersion()) {
            return $connection->getServerVersion();
        }

        // Unable to detect platform version.
        return null;
    }
864819
public function getVersion()
    {
        $url = $this->getBaseUrl() . 'config/server/version';
        $response = $this->getConnector()->get($url);
        $response = $this->verifyResult($response, $url);

        $content = $this->transformJsonResponse($response->getContent());

        return $content;
    }