phasync
BufferedStream / append

Method

BufferedStream::append

Adds $chunk to the end of the stream, without waiting for a reader.

Description#

public BufferedStream::append(
    string $chunk
): void

The content moves from memory to a temporary file when it would pass $bufferSize bytes.

Parameters#

$chunk string

Errors / Exceptions#

ExceptionWhen
LogicExceptionAfter end()

See also#

  • BufferedStream::endDeclares that nothing more will be appended, which fixes the size of the stream.