Get environment PHP version.

@return string
The PHP version defined by the environment engine service.
489223
public function getEnvPhpVersion()
    {
        /** @var EngineType $engine */
        $engine = $this->getEngineInstance();
        $instance = $engine->getServiceInstanceByType('php');

        if (empty($instance)) {
            throw new \RuntimeException(
                'No php service has been found.'
            );
        }
        $service = $instance[0];

        return $service->getVersion();
    }
680091
public function getVersionString() {
        if ($this->versionString === null) {
            if (!$this->isConnected())
                $this->connect();
            $this->versionString = mysql_get_server_info($this->hConnection);
        }
        return $this->versionString;
    }
1317065
public function environment()
    {
        if ($this->environment) {
            return $this->environment;
        }

        if (!$this->environmentProvider) {
            $this->environment = static::PRODUCTION;
            return $this->environment;
        }

        $this->setEnvironment(call_user_func($this->environmentProvider, $this));

        return $this->environment;
    }
1290026
public function getServerVersion()
    {
        try {
            $stmt = $this->query('SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info()) as INSTANCEINFO');
            $result = $stmt->fetchAll(Zend_Db::FETCH_NUM);
            if (count($result)) {
                $matches = null;
                if (preg_match('/((?:[0-9]{1,2}\.){1,3}[0-9]{1,2})/', $result[0][0], $matches)) {
                    return $matches[1];
                } else {
                    return null;
                }
            }
            return null;
        } catch (PDOException $e) {
            return null;
        }
    }
245213
private function getNamespaceVersion()
	{
		if (null !== $this->namespaceVersion) {
			return $this->namespaceVersion;
		}

		$namespaceCacheKey = $this->getNamespaceCacheKey();
		[$found, $version] = $this->doGet($namespaceCacheKey) ?? [false, null];

		if ($found === true) {
			return $this->namespaceVersion = $version;
		}

		return $this->namespaceVersion = 1;
	}
183869
public function getVersion()
  {
    $composerJson = config('app.dir') . 'composer.json';

    if (file_exists($composerJson)) {
      $composer = json_decode(file_get_contents($composerJson, true));

      $version  = isset($composer->version) ? $composer->version : '1';
      $require  = isset($composer->require) ? (array)$composer->require : false;

      if (!is_array($require)) return "{$version} (1)";

      if (isset($require['modulusphp/framework'])) {
        return $version . " ({$require['modulusphp/framework']})";
      } else {
        return "{$version} (1)";
      }
    }

    return '1';
  }
382263
public function getVersion()
    {
        $version = $this->getProjectVersion();

        if (APPLICATION_ENV !== 'production' && APPLICATION_ENV !== 'acceptance' && APPLICATION_ENV !== 'demo') {
            $version .= '.' . $this->getBuild() . ' [' . APPLICATION_ENV . ']';
        }

        return $version;
    }
1295487
public function getVersion()
    {
        $request = $this->apiRequestFactory->createRequest('GET', $this->getBaseUri() . '/version');
        $response = $this->httpClient->sendRequest($request);

        return $this->getResult($response, Version::class);
    }
27844
public static function version()
    {
        foreach (self::$_browsers as $key => $value) {
            if (preg_match($key, self::http_user_agent(), $math)) {
                self::$_arguments['version'] = $math[2];
                self::mobile();
                break;
            }
        }
        $return = "";
        $return .= self::$_arguments['version'];

        $return .= self::mobile();
        return $return;
    }
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;
    }
834178
private function getEnv()
    {
        foreach (['CONVERT', 'PYTHON', 'AUDIO_BITRATE', 'STREAM'] as $var) {
            $env = getenv($var);
            if ($env) {
                $prop = lcfirst(str_replace('_', '', ucwords(strtolower($var), '_')));
                $this->$prop = $env;
            }
        }
    }
199480
public function checkPhpVersion() {
		$phpVesion = $this->_modelConfigInstaller->getPhpVersionConfig();
		if (empty($phpVesion)) {
			return null;
		}

		$result = true;
		foreach ($phpVesion as $phpVesionItem) {
			if (!is_array($phpVesionItem)) {
				continue;
			}

			$phpVesionItem += ['', null];
			list($version, $operator) = $phpVesionItem;
			if (empty($operator)) {
				$operator = '==';
			}

			$checkResult = false;
			if (!empty($version)) {
				$checkResult = version_compare(PHP_VERSION, $version, $operator);
			}
			if (!$checkResult) {
				$result = false;
			}
		}

		return $result;
	}
310097
public function getEnvironment()
    {
        if ($this->environment == null) {
            $this->setEnvironment($this->getRevision()->getEnvironment());
        }
        return $this->environment;
    }
1013620
public function version()
    {
        $this->sendCommand('version');
        $res = fgets($this->conn, 4096);
        $this->checkForError($res);

        return trim($res);
    }
13428
public function getLongVersion()
    {
        $output = '';

        if ('UNKNOWN' !== $this->getName()) {
            if ('UNKNOWN' !== $this->getVersion()) {
                $output .= sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
            } else {
                $output .= sprintf('<info>%s</info>', $this->getName());
            }
        } else {
            $output .= '<info>Drupal Console</info>';
        }

        return $output;
    }
1298312
public function getServerVersion()
    {
        $this->_connect();
        $version = oci_server_version($this->_connection);
        if ($version !== false) {
            $matches = null;
            if (preg_match('/((?:[0-9]{1,2}\.){1,3}[0-9]{1,2})/', $version, $matches)) {
                return $matches[1];
            } else {
                return null;
            }
        } else {
            return null;
        }
    }
1021462
static function GetEnvType()
	{
		//
		//	RETURN	- environment type
		//		0	- production
		//		1	- pre-production
		//		2	- development
		//		3	- local
		//		4	- test
		//
		if ( ! is_array( $_SERVER ) ||
			! array_key_exists( 'SERVER_NAME', $_SERVER ) ||
			! is_string( $_SERVER[ 'SERVER_NAME' ] ) ||
			empty( $_SERVER[ 'SERVER_NAME' ] ) )
		{
			return self::ENV_UNKNOWN;
		}

		//	...
		$nRet = self::ENV_PRODUCTION;

		//	...
		$sServerName	= strtolower( trim( $_SERVER[ 'SERVER_NAME' ] ) );
		$sRootDomain	= strtolower( trim( self::ROOT_DOMAIN ) );

		if ( 0 == strcasecmp( $sServerName, $sRootDomain ) )
		{
			//	production
			$nRet	= self::ENV_PRODUCTION;
		}
		else if ( strstr( $sServerName, sprintf( "-pre.%s", $sRootDomain ) ) )
		{
			//	pre-production
			$nRet	= self::ENV_PRE_PRODUCTION;
		}
		else if ( strstr( $sServerName, sprintf( "-dev.%s", $sRootDomain ) ) )
		{
			//	development
			$nRet	= self::ENV_DEVELOPMENT;
		}
		else if ( strstr( $sServerName, sprintf( "-loc.%s", $sRootDomain ) ) )
		{
			//	local
			$nRet	= self::ENV_LOCAL;
		}
		else if ( strstr( $sServerName, sprintf( "-test.%s", $sRootDomain ) ) )
		{
			//	test
			$nRet	= self::ENV_TEST;
		}
		else
		{
			//	test for production
			$sNeedle	= sprintf( ".%s", $sRootDomain );
			$nRightPos	= strlen( $sServerName ) - strlen( $sNeedle ) - 1;
			$nSearchPos	= strrpos( $sServerName, $sNeedle );

			if ( $nRightPos > 0 && $nRightPos === $nSearchPos )
			{
				//	production
				$nRet = self::ENV_PRODUCTION;
			}
		}

		return $nRet;
	}