public function __construct(callable
$source, array
$options =
[]) { $this->source =
$source;
$this->size =
$options['size'
] ?? null;
$this->metadata =
$options['metadata'
] ??
[];
$this->buffer =
new BufferStream();
} public function __toString(): string
{ try { return Utils::
copyToString($this);
} catch (\Throwable
$e) { if (\PHP_VERSION_ID >= 70400
) { throw $e;
} trigger_error(sprintf('%s::__toString exception: %s', self::
class,
(string) $e), E_USER_ERROR
);