src/Utils/CommonUtil.php
public static function majorVersion($version)
    {
        $components = explode('.', $version);
        foreach ($components as $key => $value) {
            if ($key > 0 && is_numeric($value)) {
                $components[$key] = '0';
            }
        }

        return implode('.', $components);
    }
public static function majorVersion($version)
    {
        $components = explode('.', $version);
        foreach ($components as $key => $value) {
            if ($key > 0 && is_numeric($value)) {
                $components[$key] = '0';
            }
        }

        return implode('.', $components);
    }
public static function majorVersion ( $ version ) { $ components = explode ( '.' , $ version ) ; foreach ( $ components as $ key => $ value ) { if ( $ key > 0 && is_numeric ( $ value ) ) { $ components [ $ key ] = '0' ; } } return implode ( '.' , $ components ) ; }
Get major version
@param  string $version
@return string
Get major version