original_string: public function read($count)
      {
          $contentLength = strlen($this->data);
          if ($this->position > $contentLength || $count > $contentLength - $this->position) {
              throw new EndOfStreamException(
                  sprintf(
                      'End of stream reached when trying to read %d bytes. content length=%d, position=%d',
                      $count,
                      $contentLength,
                      $this->position
                  )
              );
          }
  
          $chunk = substr($this->data, $this->position, $count);
          if ($chunk === false) {
              $chunk = '';
          }
  
          $readBytes = strlen($chunk);
          $this->position += $readBytes;
  
          return $chunk;
      }
code: public function read($count)
      {
          $contentLength = strlen($this->data);
          if ($this->position > $contentLength || $count > $contentLength - $this->position) {
              throw new EndOfStreamException(
                  sprintf(
                      'End of stream reached when trying to read %d bytes. content length=%d, position=%d',
                      $count,
                      $contentLength,
                      $this->position
                  )
              );
          }
  
          $chunk = substr($this->data, $this->position, $count);
          if ($chunk === false) {
              $chunk = '';
          }
  
          $readBytes = strlen($chunk);
          $this->position += $readBytes;
  
          return $chunk;
      }
code_tokens: public function read ( $ count ) { $ contentLength = strlen ( $ this -> data ) ; if ( $ this -> position > $ contentLength || $ count > $ contentLength - $ this -> position ) { throw new EndOfStreamException ( sprintf ( 'End of stream reached when trying to read %d bytes. content length=%d, position=%d' , $ count , $ contentLength , $ this -> position ) ) ; } $ chunk = substr ( $ this -> data , $ this -> position , $ count ) ; if ( $ chunk === false ) { $ chunk = '' ; } $ readBytes = strlen ( $ chunk ) ; $ this -> position += $ readBytes ; return $ chunk ; }
docstring: Returns the desired number of bytes.
  
  @param int $count
  
  @throws EndOfStreamException
  
  @return string
docstring_tokens: Returns the desired number of bytes .