-
Notifications
You must be signed in to change notification settings - Fork 1
Stream: rewind Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\Stream
Seek to the beginning of the stream.
-
return
void
Example:
$resource = fopen(BOOTSTRAP_DIR . '/sample/shieldon_logo.png', 'r+');
$stream = new Stream($resource);
$stream->seek(10);
echo $stream->tell();
// Outputs: 10
$stream->rewind();
echo $stream->tell();
// Outputs: 0
$stream->close();
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.