PHP zip_open() — legacy ZIP API

zip_open() opens a ZIP file by its local path. PHP deprecated this procedural function in 8.0. For new code, use ZipArchive::open().

A simple example

zip_open()

  1. Start with Archive containing a.txt
  2. Do this Open the ZIP archive
  3. Result Archive ready to inspect
Opening the archive gives access to its directory of entries.

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.