original_string: public function write($buf, $len = null)
      {
          if (!$this->write_) {
              return $this->transport_->write($buf, $len);
          }
  
          if ($len !== null && $len < TStringFuncFactory::create()->strlen($buf)) {
              $buf = TStringFuncFactory::create()->substr($buf, 0, $len);
          }
          $this->wBuf_ .= $buf;
      }
code: public function write($buf, $len = null)
      {
          if (!$this->write_) {
              return $this->transport_->write($buf, $len);
          }
  
          if ($len !== null && $len < TStringFuncFactory::create()->strlen($buf)) {
              $buf = TStringFuncFactory::create()->substr($buf, 0, $len);
          }
          $this->wBuf_ .= $buf;
      }
code_tokens: public function write ( $ buf , $ len = null ) { if ( ! $ this -> write_ ) { return $ this -> transport_ -> write ( $ buf , $ len ) ; } if ( $ len !== null && $ len < TStringFuncFactory :: create ( ) -> strlen ( $ buf ) ) { $ buf = TStringFuncFactory :: create ( ) -> substr ( $ buf , 0 , $ len ) ; } $ this -> wBuf_ .= $ buf ; }
docstring: Writes some data to the pending output buffer.
  
  @param string $buf The data
  @param int $len Limit of bytes to write
docstring_tokens: Writes some data to the pending output buffer .