Reference to PHP ZIP Functions

In PHP programming, ZIP functions provide powerful tools to create, read, and manipulate ZIP archive files. These functions allow you to access compressed files, add new files, or extract contents with ease. This guide offers a complete reference to all 10 PHP ZIP functions, helping you efficiently work with ZIP archives in your projects.

Alphabetical Reference

The table below lists all 10 PHP ZIP functions, arranged in alphabetical order.

10 PHP ZIP Functions
Function Description
zip_close() Closes an open ZIP archive file.
zip_entry_close() Closes an open ZIP directory entry.
zip_entry_compressedsize() Returns the compressed size of a ZIP entry.
zip_entry_compressionmethod() Gets the compression method used by a ZIP entry.
zip_entry_filesize() Returns the original file size of a ZIP entry.
zip_entry_name() Retrieves the name of a ZIP directory entry.
zip_entry_open() Opens a ZIP directory entry for reading.
zip_entry_read() Reads data from an open ZIP directory entry.
zip_open() Opens a ZIP archive file for processing.
zip_read() Reads the next entry in an open ZIP archive.

Warning:

Since PHP 8.0, the ZIP Archive Functions are Deprecated. ZipArchive should be used.