-
Notifications
You must be signed in to change notification settings - Fork 1
Stream: write Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\Stream
-
param
stringstring*The string that is to be written. -
return
intReturns the number of bytes written to the stream.
Example:
$stream = new Stream(fopen('php://temp', 'r+'));
$stream->write('Foo Bar');
echo $stream->getContents();
// Outputs: Foo Barcomposer require shieldon/psr-httpShieldon PSR HTTP implementation written by Terry L. from Taiwan.
