src/Utilities/Uri.php
public static function getUserOperatingSystemName()
    {
        $info = self::getUserWebBrowserInfo();

        $knownSystems = [
            'Linux' => 'Linux',
            'Win'   => 'Windows',
            'Mac'   => 'Mac OS',
        ];

        foreach ($knownSystems as $pattern => $systemName) {
            $matches = [];
            $matchCount = preg_match(sprintf('|%s|', $pattern), $info, $matches);

            if ($matchCount > 0) {
                return $systemName;
            }
        }

        return '';
    }
public static function getUserOperatingSystemName()
    {
        $info = self::getUserWebBrowserInfo();

        $knownSystems = [
            'Linux' => 'Linux',
            'Win'   => 'Windows',
            'Mac'   => 'Mac OS',
        ];

        foreach ($knownSystems as $pattern => $systemName) {
            $matches = [];
            $matchCount = preg_match(sprintf('|%s|', $pattern), $info, $matches);

            if ($matchCount > 0) {
                return $systemName;
            }
        }

        return '';
    }
public static function getUserOperatingSystemName ( ) { $ info = self :: getUserWebBrowserInfo ( ) ; $ knownSystems = [ 'Linux' => 'Linux' , 'Win' => 'Windows' , 'Mac' => 'Mac OS' , ] ; foreach ( $ knownSystems as $ pattern => $ systemName ) { $ matches = [ ] ; $ matchCount = preg_match ( sprintf ( '|%s|' , $ pattern ) , $ info , $ matches ) ; if ( $ matchCount > 0 ) { return $ systemName ; } } return '' ; }
Returns name of user's operating system

@return string
Returns name of user s operating system