phasync
StringBuffer / unread

Method

StringBuffer::unread

Puts $chunk back at the front of the buffer, to be read first.

Description#

public StringBuffer::unread(
    string $chunk
): void

Parameters#

$chunk string
Bytes that were read and not used

Errors / Exceptions#

ExceptionWhen
LogicExceptionIf the buffer has ended and is empty

See also#