phasync
MultipartStream / read

Method

MultipartStream::read

Read data from the stream.

Description#

public MultipartStream::read(
    $length
): string

Parameters#

$length
Read up to $length bytes from the object and return them. Fewer than $length bytes may be returned if underlying stream call returns fewer bytes.

Return values#

Returns the data read from the stream, or an empty string if no bytes are available. string

Errors / Exceptions#

ExceptionWhen
RuntimeExceptionIf an error occurs.