public function readLine($res = 'out')
    {
        $str = fgets($this->pipes[$res]);
        if (substr($str, -1) == "\n") {
            $str = substr($str, 0, -1);
        }

        return $str;
    }
public function readLine($res = 'out')
    {
        $str = fgets($this->pipes[$res]);
        if (substr($str, -1) == "\n") {
            $str = substr($str, 0, -1);
        }

        return $str;
    }
public function readLine ( $ res = 'out' ) { $ str = fgets ( $ this -> pipes [ $ res ] ) ; if ( substr ( $ str , - 1 ) == "\n" ) { $ str = substr ( $ str , 0 , - 1 ) ; } return $ str ; }
Reads one line of output. Careful - if no output is provided it
this function  will be waiting.

@param string $res optional descriptor (either out or err)

@return self
Reads one line of output . Careful - if no output is provided it this function will be waiting .