Returns the version number which was submitted by the client in the
accept header field

@return integer
349265
private function getSubmittedVersionNumber(RequestInterface $request)
    {
        $accept  = $request->getHeader('Accept');
        $matches = array();

        preg_match('/^application\/vnd\.([a-z.-_]+)\.v([\d]+)\+([a-z]+)$/', $accept, $matches);

        return isset($matches[2]) ? $matches[2] : null;
    }
591749
public function getVersion() : ?int
    {
        if (null === $this->version) {
            $success = null;

            try {
                $version = $this->getItem('browscap.version', false, $success);
            } catch (InvalidArgumentException $e) {
                $this->logger->error(new \InvalidArgumentException('an error occured while reading the data version from the cache', 0, $e));
                $version = null;
            }

            if (null !== $version && $success) {
                $this->version = (int) $version;
            }
        }

        return $this->version;
    }
28947
public function getVersion()
    {
        $returnValue = (string) '';

        if (!empty($this->version)){
        	$returnValue = $this->version;
        }

        return (string) $returnValue;
    }
775329
public function checkPhpVersion()
    {
        $min = $this->getDependencyPhpVersionMin();
        $max = $this->getDependencyPhpVersionMax();

        $minOk = $min? version_compare(PHP_VERSION, $min, ">=") : true;
        $maxOk = $max? version_compare(PHP_VERSION, $max, "<=") : true;

        if(!$minOk || !$maxOk) {
            $err = "requires PHP version ";
            if($min && $max) {
                $err .= " >= $min and <= $max ";
            } elseif($min) {
                $err .= " >= $min ";
            } elseif($max) {
                $err .=  " <= $max ";
            }
            $err .= " current is: ".PHP_VERSION;
            return $err;
        }
        return true;
    }
1120107
protected function version()
    {
        $version = $this->argument('version');

        if (!$version) {
            return $this->latestVersion();
        }

        if (!ctype_digit($version)) {
            return $version;
        }

        $version = (int) $version;

        if ($version < 70) {
            return $this->legacyVersion($version);
        }

        $url = sprintf(static::$versionUrl, $version);

        return trim(file_get_contents($url));
    }
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;
	}
961191
public function getFormVersion()
    {
        if (empty($this->formVersion)) {
            foreach ($this->_xml->children('h', true)->head->children()->model->instance->children() as $element) {
                if (!empty($element->attributes()->version)) {
                    $this->formVersion = $element->attributes()->version;
                    break;
                }
            }
        }

        return $this->formVersion;

    }
687227
private function getVersion()
    {
        $select = new QueryBuilder();
        $versionRow = $select
            ->query("SELECT value FROM {$this->table} WHERE param = 'migration_version'")
            ->fetchRow();

        if (!isset($versionRow['value'])) die("Error: Please init the Crater Migration");
        return $versionRow['value'];
    }
608459
public function getServerVersion() : string
    {
        return (is_array($this->apache_info) && array_key_exists('server-version', $this->apache_info))
                ? $this->apache_info['server-version']
                : 'Unknown'
        ;
    }
161686
public function getVersion()
    {
        $version = explode('-', parent::getVersion());

        if (isset($version[1]) && 0 === strpos($version[1], '$')) {
            return "{$version[0]}-source";
        }

        return implode('-', $version);
    }
1234293
public static function getPHPVersion()
    {
        // PHP_VERSION_ID is available as of PHP 5.2.7, if the current version is older than that - emulate it
        if (!defined('PHP_VERSION_ID')) {
            list($major, $minor, $release) = explode('.', PHP_VERSION);

            /**
             * Define PHP_VERSION_ID if its not present (unsupported version)
             *
             * format: major minor release
             */
            define('PHP_VERSION_ID', (($major * 10000) + ($minor * 100) + $release));
        }

        return (int)PHP_VERSION_ID;
    }
1103136
protected function getVersion()
    {
        static $version;
        if (!$version) {
            $version = false;
            $string = $this->execute(['--version'], false);
            if ($string && preg_match('/(^| )([0-9]+[^ ]*)/', $string, $matches)) {
                $version = $matches[2];
            }
        }

        return $version;
    }
904514
public function getVersionString() {
        if (!isset($this->versionString)) {
            if (!$this->isConnected())
                $this->connect();
            $this->versionString = $this->sqlite->version()['versionString'];
        }
        return $this->versionString;
    }
223198
public function getVersion()
    {
        if ($this->_version) {
            return $this->_version;
        }

        $data = $this->request('/')->getData();

        return $this->_version = $data['version']['number'];
    }
1159401
public function version()
    {
        $changelog = @file_get_contents(__DIR__.'/../../changelog.md');

        if (!$changelog) {
            return 'unknown version';
        }

        $matches = strstr($changelog, '## [');
        $until = strpos($matches, '-');

        return str_replace(']', '', substr($matches, 5, $until - 5));
    }
1089690
public function getNextTailVersion()
    {
        if (count($this->stabilityVersion) && $this->stabilityVersion[0] != 'stable') {
            return implode('.', $this->version);
        }
        $v = $this->version;
        $last = count($v) - 1;
        if ($v[$last] !== '*') {
            ++$v[$last];
        }

        return implode('.', $v);
    }
846592
public function getVersion()
    {
        /** @var Response $response */
        $response = $this->get('version', $this->getGuzzleOptions());
        $version = 0.0;

        // Parse output
        if ($response->getStatusCode() == 200
            && preg_match('/Apache Tika (?<version>[\.\d]+)/', $response->getBody(), $matches)
        ) {
            $version = (float)$matches['version'];
        }

        return $version;
    }