public function readLine($length = 1024)
    {
        if ($this->ensureContent() === false) {
            return false;
        }

        $line = '';
        while ($this->ensureContent()) {
            $char = $this->readByte();

            if ($char === "\n") {
                break;
            }

            if ($char === "\r") {
                if ($this->getByte() === "\n") {
                    $this->addOffset(1);
                }
                break;
            }

            $line .= $char;

            if (\strlen($line) >= $length) {
                break;
            }
        }

        return $line;
    }
public function readLine($length = 1024)
    {
        if ($this->ensureContent() === false) {
            return false;
        }

        $line = '';
        while ($this->ensureContent()) {
            $char = $this->readByte();

            if ($char === "\n") {
                break;
            }

            if ($char === "\r") {
                if ($this->getByte() === "\n") {
                    $this->addOffset(1);
                }
                break;
            }

            $line .= $char;

            if (\strlen($line) >= $length) {
                break;
            }
        }

        return $line;
    }
public function readLine ( $ length = 1024 ) { if ( $ this -> ensureContent ( ) === false ) { return false ; } $ line = '' ; while ( $ this -> ensureContent ( ) ) { $ char = $ this -> readByte ( ) ; if ( $ char === "\n" ) { break ; } if ( $ char === "\r" ) { if ( $ this -> getByte ( ) === "\n" ) { $ this -> addOffset ( 1 ) ; } break ; } $ line .= $ char ; if ( \ strlen ( $ line ) >= $ length ) { break ; } } return $ line ; }
Read a line from the current position.

@param int $length
@return string|bool
Read a line from the current position .