Although numFiles will change after overwriting a file, it will be back normal when you ZipArchive::close() and open() it again.NULL indexes don't persist either. Only the new order is kept. So feel free to overwrite.

Here overwriting works the same as deleting and adding. So it's not necessary to ZipArchive::deleteName() first.