original_string: public function shift($bytes)
      {
          $bufferLen = strlen($this->buffer);
  
          if ($bytes === $bufferLen) {
              $return       = $this->buffer;
              $this->buffer = '';
          } else {
              $return       = substr($this->buffer, 0, $bytes);
              $this->buffer = substr($this->buffer, $bytes);
          }
  
          return $return;
      }
code: public function shift($bytes)
      {
          $bufferLen = strlen($this->buffer);
  
          if ($bytes === $bufferLen) {
              $return       = $this->buffer;
              $this->buffer = '';
          } else {
              $return       = substr($this->buffer, 0, $bytes);
              $this->buffer = substr($this->buffer, $bytes);
          }
  
          return $return;
      }
code_tokens: public function shift ( $ bytes ) { $ bufferLen = strlen ( $ this -> buffer ) ; if ( $ bytes === $ bufferLen ) { $ return = $ this -> buffer ; $ this -> buffer = '' ; } else { $ return = substr ( $ this -> buffer , 0 , $ bytes ) ; $ this -> buffer = substr ( $ this -> buffer , $ bytes ) ; } return $ return ; }
docstring: shift bytes from buffer
  
  @param $bytes - up to buffer-length bytes
  
  @return string
docstring_tokens: shift bytes from buffer