code: private function readBof()
      {
          $length = self::getUInt2d($this->data, $this->pos + 2);
          $recordData = substr($this->data, $this->pos + 4, $length);
  
          // move stream pointer to next record
          $this->pos += 4 + $length;
  
          // offset: 2; size: 2; type of the following data
          $substreamType = self::getUInt2d($recordData, 2);
  
          switch ($substreamType) {
              case self::XLS_WORKBOOKGLOBALS:
                  $version = self::getUInt2d($recordData, 0);
                  if (($version != self::XLS_BIFF8) && ($version != self::XLS_BIFF7)) {
                      throw new Exception('Cannot read this Excel file. Version is too old.');
                  }
                  $this->version = $version;
  
                  break;
              case self::XLS_WORKSHEET:
                  // do not use this version information for anything
                  // it is unreliable (OpenOffice doc, 5.8), use only version information from the global stream
                  break;
              default:
                  // substream, e.g. chart
                  // just skip the entire substream
                  do {
                      $code = self::getUInt2d($this->data, $this->pos);
                      $this->readDefault();
                  } while ($code != self::XLS_TYPE_EOF && $this->pos < $this->dataSize);
  
                  break;
          }
      }
docs: Read BOF.