code: public function tell()
      {
          $position = false;
  
          $this->stream && $position = ftell($this->stream);
  
          if (is_null($this->stream) || $position === false) {
              $message = 'Could not get position of pointer in stream';
  
              throw new \RuntimeException($message);
          }
  
          return $position;
      }
docs: Returns the current position of the file read/write pointer.
  
  @return integer
  
  @throws \RuntimeException