-
Notifications
You must be signed in to change notification settings - Fork 2
Stream: __toString Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\Stream
Reads all data from the stream into a string, from the beginning to end.
-
return
string
Example:
$stream = new Stream(fopen('php://temp', 'r+'));
$stream->write('Foo Bar');
echo $stream;
// Outputs: Foo Bar
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.