original_string: public function getHttpHost()
      {
          if (isset($_SERVER['HTTP_HOST'])
              && isset($_SERVER['SERVER_NAME'])
              && $_SERVER['HTTP_HOST'] === $_SERVER['SERVER_NAME']
          ) {
              return $_SERVER['HTTP_HOST'];
          }
  
          if (isset($_SERVER['HTTP_HOST'])) {
              return $_SERVER['HTTP_HOST'];
          }
  
          // This is the least reliable, due to the ability to spoof it
          if (isset($_SERVER['SERVER_NAME'])) {
              return $_SERVER['SERVER_NAME'];
          }
  
          return null;
      }
code: public function getHttpHost()
      {
          if (isset($_SERVER['HTTP_HOST'])
              && isset($_SERVER['SERVER_NAME'])
              && $_SERVER['HTTP_HOST'] === $_SERVER['SERVER_NAME']
          ) {
              return $_SERVER['HTTP_HOST'];
          }
  
          if (isset($_SERVER['HTTP_HOST'])) {
              return $_SERVER['HTTP_HOST'];
          }
  
          // This is the least reliable, due to the ability to spoof it
          if (isset($_SERVER['SERVER_NAME'])) {
              return $_SERVER['SERVER_NAME'];
          }
  
          return null;
      }
code_tokens: public function getHttpHost ( ) { if ( isset ( $ _SERVER [ 'HTTP_HOST' ] ) && isset ( $ _SERVER [ 'SERVER_NAME' ] ) && $ _SERVER [ 'HTTP_HOST' ] === $ _SERVER [ 'SERVER_NAME' ] ) { return $ _SERVER [ 'HTTP_HOST' ] ; } if ( isset ( $ _SERVER [ 'HTTP_HOST' ] ) ) { return $ _SERVER [ 'HTTP_HOST' ] ; } // This is the least reliable, due to the ability to spoof it if ( isset ( $ _SERVER [ 'SERVER_NAME' ] ) ) { return $ _SERVER [ 'SERVER_NAME' ] ; } return null ; }
docstring: Return the http host, if possible.
  
  @return null|string
docstring_tokens: Return the http host if possible .