code: public function getSize()
      {
          if (is_null($this->size) === true) {
              $stats = fstat($this->stream);
  
              $this->size = $stats['size'];
          }
  
          return $this->size;
      }
docs: Returns the size of the stream if known.
  
  @return integer|null