src/RpkUtils/Sysinfo/Server.php
public static function hostname()
    {
        if($os = static::os(true)){
            $os = explode(' ', $os);
             if('/' == DIRECTORY_SEPARATOR ){
                $hostname = $os[1];
            }else{
                $hostname = $os[2];
            }
        }else{
            $hostname = '';
        }
        
        return $hostname;
    }
public static function hostname()
    {
        if($os = static::os(true)){
            $os = explode(' ', $os);
             if('/' == DIRECTORY_SEPARATOR ){
                $hostname = $os[1];
            }else{
                $hostname = $os[2];
            }
        }else{
            $hostname = '';
        }
        
        return $hostname;
    }
public static function hostname ( ) { if ( $ os = static :: os ( true ) ) { $ os = explode ( ' ' , $ os ) ; if ( '/' == DIRECTORY_SEPARATOR ) { $ hostname = $ os [ 1 ] ; } else { $ hostname = $ os [ 2 ] ; } } else { $ hostname = '' ; } return $ hostname ; }
Server hostname
@return string
Server hostname