PHP zip_close() — legacy ZIP API

zip_close() closes an open ZIP archive and releases its resource. PHP deprecated this procedural function in 8.0. For new code, use ZipArchive::close().

A simple example

zip_close()

  1. Start with An open archive
  2. Do this Close the archive
  3. Result Archive handle released
Finish reading entries before closing the archive that owns them.

Use ZipArchive to read entries by name in modern PHP.

To run the examples, save bbminfo.zip beside your script and run it from that directory.