You are here

public function Stream::tell in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-diactoros/src/Stream.php \Zend\Diactoros\Stream::tell()
  2. 8.0 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::tell()
  3. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/Stream.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\Stream::tell()
Same name and namespace in other branches
  1. 8 vendor/guzzlehttp/psr7/src/Stream.php \GuzzleHttp\Psr7\Stream::tell()

Returns the current position of the file read/write pointer

Return value

int Position of the file pointer

Throws

\RuntimeException on error.

Overrides StreamInterface::tell

File

vendor/guzzlehttp/psr7/src/Stream.php, line 179

Class

Stream
PHP stream implementation.

Namespace

GuzzleHttp\Psr7

Code

public function tell() {
  $result = ftell($this->stream);
  if ($result === false) {
    throw new \RuntimeException('Unable to determine stream position');
  }
  return $result;
}