code: 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;
      }
docs: Server hostname
  @return string