original_string: public function readAll($res = 'out')
      {
          $str = '';
          $this->debugStatus();
          $this->debug('reading all output');
          //stream_set_blocking($this->pipes[$res],0);
          $str = stream_get_contents($this->pipes[$res]);
          $this->close($res);
          if (substr($str, -1) != "\n") {
              $str .= "\n";
          }
  
          return $str;
      }
code: public function readAll($res = 'out')
      {
          $str = '';
          $this->debugStatus();
          $this->debug('reading all output');
          //stream_set_blocking($this->pipes[$res],0);
          $str = stream_get_contents($this->pipes[$res]);
          $this->close($res);
          if (substr($str, -1) != "\n") {
              $str .= "\n";
          }
  
          return $str;
      }
code_tokens: public function readAll ( $ res = 'out' ) { $ str = '' ; $ this -> debugStatus ( ) ; $ this -> debug ( 'reading all output' ) ; //stream_set_blocking($this->pipes[$res],0); $ str = stream_get_contents ( $ this -> pipes [ $ res ] ) ; $ this -> close ( $ res ) ; if ( substr ( $ str , - 1 ) != "\n" ) { $ str .= "\n" ; } return $ str ; }
docstring: Reads all output and returns. Closes stdout when EOF reached.
  
  @param string $res optional descriptor (out or err)
  
  @return self
docstring_tokens: Reads all output and returns . Closes stdout when EOF reached .