public function getPlatformVersion($returnVersionNumbers = false, $returnServerFlavor = false)
    {
        if ($this->_platformVersion == self::PLATFORM_VERSION_UNKNOWN || $this->_platformVersion == '') {
            return self::PLATFORM_VERSION_UNKNOWN;
        }

        if ($returnVersionNumbers) {
            return $this->_platformVersion;
        } else {
            switch ($this->getPlatform()) {
                case self::PLATFORM_WINDOWS:
                    if (substr($this->_platformVersion, 0, 3) == 'NT ') {
                        return $this->windowsNTVerToStr(substr($this->_platformVersion, 3), $returnServerFlavor);
                    } else {
                        return $this->windowsVerToStr($this->_platformVersion);
                    }
                    break;

                case self::PLATFORM_MACINTOSH:
                    return $this->macVerToStr($this->_platformVersion);

                case self::PLATFORM_ANDROID:
                    return $this->androidVerToStr($this->_platformVersion);

                case self::PLATFORM_IOS:
                    return $this->iOSVerToStr($this->_platformVersion);

                default: return self::PLATFORM_VERSION_UNKNOWN;
            }
        }
    }
public function getPlatformVersion($returnVersionNumbers = false, $returnServerFlavor = false)
    {
        if ($this->_platformVersion == self::PLATFORM_VERSION_UNKNOWN || $this->_platformVersion == '') {
            return self::PLATFORM_VERSION_UNKNOWN;
        }

        if ($returnVersionNumbers) {
            return $this->_platformVersion;
        } else {
            switch ($this->getPlatform()) {
                case self::PLATFORM_WINDOWS:
                    if (substr($this->_platformVersion, 0, 3) == 'NT ') {
                        return $this->windowsNTVerToStr(substr($this->_platformVersion, 3), $returnServerFlavor);
                    } else {
                        return $this->windowsVerToStr($this->_platformVersion);
                    }
                    break;

                case self::PLATFORM_MACINTOSH:
                    return $this->macVerToStr($this->_platformVersion);

                case self::PLATFORM_ANDROID:
                    return $this->androidVerToStr($this->_platformVersion);

                case self::PLATFORM_IOS:
                    return $this->iOSVerToStr($this->_platformVersion);

                default: return self::PLATFORM_VERSION_UNKNOWN;
            }
        }
    }
public function getPlatformVersion ( $ returnVersionNumbers = false , $ returnServerFlavor = false ) { if ( $ this -> _platformVersion == self :: PLATFORM_VERSION_UNKNOWN || $ this -> _platformVersion == '' ) { return self :: PLATFORM_VERSION_UNKNOWN ; } if ( $ returnVersionNumbers ) { return $ this -> _platformVersion ; } else { switch ( $ this -> getPlatform ( ) ) { case self :: PLATFORM_WINDOWS : if ( substr ( $ this -> _platformVersion , 0 , 3 ) == 'NT ' ) { return $ this -> windowsNTVerToStr ( substr ( $ this -> _platformVersion , 3 ) , $ returnServerFlavor ) ; } else { return $ this -> windowsVerToStr ( $ this -> _platformVersion ) ; } break ; case self :: PLATFORM_MACINTOSH : return $ this -> macVerToStr ( $ this -> _platformVersion ) ; case self :: PLATFORM_ANDROID : return $ this -> androidVerToStr ( $ this -> _platformVersion ) ; case self :: PLATFORM_IOS : return $ this -> iOSVerToStr ( $ this -> _platformVersion ) ; default : return self :: PLATFORM_VERSION_UNKNOWN ; } } }
Get the platform version on which the browser is run on. It can be returned as a string number like 'NT 6.3' or
as a name like 'Windows 8.1'. When returning version string numbers for Windows NT OS families the number is
prefixed by 'NT ' to differentiate from older Windows 3.x & 9x release. At the moment only the Windows and
Android operating systems are supported.
@param boolean $returnVersionNumbers (optional) Determines if the return value must be versions numbers as a
string (true) or the version name (false).
@param boolean $returnServerFlavor (optional) Since some Windows NT versions have the same values, this flag
determines if the Server flavor is returned or not. For instance Windows 8.1 and Windows Server 2012 R2 both use
version 6.3. This parameter is only useful when testing for Windows.
@return string Returns the version name/version numbers of the platform or the constant PLATFORM_VERSION_UNKNOWN
if unknown.
Get the platform version on which the browser is run on . It can be returned as a string number like NT 6 . 3 or as a name like Windows 8 . 1 . When returning version string numbers for Windows NT OS families the number is prefixed by NT to differentiate from older Windows 3 . x & 9x release . At the moment only the Windows and Android operating systems are supported .