Function stream_for
Create a new stream based on the input type.
Options is an associative array that can contain the following keys: - metadata: Array of custom metadata. - size: Size of the stream.
resource|string|null|integer|float|boolean| |
$resource = '' |
Entity body data |
array |
$options = [] |
Additional options |
|
Stream |
InvalidArgumentException
|
if the $resource arg is not valid. |