-
Notifications
You must be signed in to change notification settings - Fork 1
Stream: tell Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\Stream
Returns the current position of the file read/write pointer
-
return
int
Position of the file pointer
$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.