public function read()
    {
        $this->ensureDeviceOpen();

        $chars = [];

        do {
            $char = fread($this->fd, 1);
            $chars[] = $char;
        } while ($char != $this->getParser()->getSeparator());

        return $this->getParser()->parse($chars);
    }
public function read()
    {
        $this->ensureDeviceOpen();

        $chars = [];

        do {
            $char = fread($this->fd, 1);
            $chars[] = $char;
        } while ($char != $this->getParser()->getSeparator());

        return $this->getParser()->parse($chars);
    }
public function read ( ) { $ this -> ensureDeviceOpen ( ) ; $ chars = [ ] ; do { $ char = fread ( $ this -> fd , 1 ) ; $ chars [ ] = $ char ; } while ( $ char != $ this -> getParser ( ) -> getSeparator ( ) ) ; return $ this -> getParser ( ) -> parse ( $ chars ) ; }
Read data byte per byte until separator found

@return string
Read data byte per byte until separator found