original_string: protected function _scanStream($fp)
      {
          rewind($fp);
  
          stream_filter_register(
              'horde_mime_scan_stream',
              'Horde_Mime_Filter_Encoding'
          );
          $filter_params = new stdClass;
          $filter = stream_filter_append(
              $fp,
              'horde_mime_scan_stream',
              STREAM_FILTER_READ,
              $filter_params
          );
  
          while (!feof($fp)) {
              fread($fp, 8192);
          }
  
          stream_filter_remove($filter);
  
          return $filter_params->body;
      }
code: protected function _scanStream($fp)
      {
          rewind($fp);
  
          stream_filter_register(
              'horde_mime_scan_stream',
              'Horde_Mime_Filter_Encoding'
          );
          $filter_params = new stdClass;
          $filter = stream_filter_append(
              $fp,
              'horde_mime_scan_stream',
              STREAM_FILTER_READ,
              $filter_params
          );
  
          while (!feof($fp)) {
              fread($fp, 8192);
          }
  
          stream_filter_remove($filter);
  
          return $filter_params->body;
      }
code_tokens: protected function _scanStream ( $ fp ) { rewind ( $ fp ) ; stream_filter_register ( 'horde_mime_scan_stream' , 'Horde_Mime_Filter_Encoding' ) ; $ filter_params = new stdClass ; $ filter = stream_filter_append ( $ fp , 'horde_mime_scan_stream' , STREAM_FILTER_READ , $ filter_params ) ; while ( ! feof ( $ fp ) ) { fread ( $ fp , 8192 ) ; } stream_filter_remove ( $ filter ) ; return $ filter_params -> body ; }
docstring: Scans a stream for content type.
  
  @param resource $fp  A stream resource.
  
  @return mixed  Either 'binary', '8bit', or false.
docstring_tokens: Scans a stream for content type .