public static function os()
    {
        if ( is_null( self::$os ) )
        {
            $uname = php_uname( 's' );
            if ( substr( $uname, 0, 7 ) == 'Windows' )
            {
                self::$os = 'Windows';
            }
            elseif ( substr( $uname, 0, 3 ) == 'Mac' )
            {
                self::$os = 'Mac';
            }
            elseif ( strtolower( $uname ) == 'linux' )
            {
                self::$os = 'Linux';
            }
            elseif ( strtolower( substr( $uname, 0, 7 ) ) == 'freebsd' )
            {
                self::$os = 'FreeBSD';
            }
            else
            {
                self::$os = PHP_OS;
            }
        }
        return self::$os;
    }
public static function os()
    {
        if ( is_null( self::$os ) )
        {
            $uname = php_uname( 's' );
            if ( substr( $uname, 0, 7 ) == 'Windows' )
            {
                self::$os = 'Windows';
            }
            elseif ( substr( $uname, 0, 3 ) == 'Mac' )
            {
                self::$os = 'Mac';
            }
            elseif ( strtolower( $uname ) == 'linux' )
            {
                self::$os = 'Linux';
            }
            elseif ( strtolower( substr( $uname, 0, 7 ) ) == 'freebsd' )
            {
                self::$os = 'FreeBSD';
            }
            else
            {
                self::$os = PHP_OS;
            }
        }
        return self::$os;
    }
public static function os ( ) { if ( is_null ( self :: $ os ) ) { $ uname = php_uname ( 's' ) ; if ( substr ( $ uname , 0 , 7 ) == 'Windows' ) { self :: $ os = 'Windows' ; } elseif ( substr ( $ uname , 0 , 3 ) == 'Mac' ) { self :: $ os = 'Mac' ; } elseif ( strtolower ( $ uname ) == 'linux' ) { self :: $ os = 'Linux' ; } elseif ( strtolower ( substr ( $ uname , 0 , 7 ) ) == 'freebsd' ) { self :: $ os = 'FreeBSD' ; } else { self :: $ os = PHP_OS ; } } return self :: $ os ; }
Returns the operating system on which PHP is running.

This method returns a sanitized form of the OS name, example
return values are "Windows", "Mac", "Linux" and "FreeBSD". In
all other cases it returns the value of the internal PHP constant
PHP_OS.

@return string
Returns the operating system on which PHP is running .