PhpBrew\Config::getCurrentPhpName PHP Method

getCurrentPhpName() public static method

getCurrentPhpName return the current php version from self::$currentPhpVersion or from environment variable PHPBREW_PHP.
public static getCurrentPhpName ( ) : string
return string
    public static function getCurrentPhpName()
    {
        if (self::$currentPhpVersion !== null) {
            return self::$currentPhpVersion;
        }
        return getenv('PHPBREW_PHP');
    }

Usage Example

Example #1
0
 public function execute()
 {
     $root = Config::getPhpbrewRoot();
     $php = Config::getCurrentPhpName();
     $file = "{$root}/php/{$php}/etc/php.ini";
     Utils::editor($file);
 }
All Usage Examples Of PhpBrew\Config::getCurrentPhpName