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;
    }
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;
    }
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 ; }
Get the installed version of the Git CLI.

@return string|false
The version number, or false on failure.
Get the installed version of the Git CLI .