PHPackages                             tkzo/zip-archiver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. tkzo/zip-archiver

ActiveLibrary[File &amp; Storage](/categories/file-storage)

tkzo/zip-archiver
=================

Easy to make zip archive in PHP.

v1.0.0(4y ago)077MITPHPPHP ^7.0 || ^8.0

Since Sep 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/1105-6601/zip-archiver)[ Packagist](https://packagist.org/packages/tkzo/zip-archiver)[ RSS](/packages/tkzo-zip-archiver/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Easy to make zip archive in PHP.
================================

[](#easy-to-make-zip-archive-in-php)

[![Build Status](https://camo.githubusercontent.com/2b0da824012a44bde2f88a8929d209a4e415392284affad1f233e02ae9de3e6e/68747470733a2f2f7472617669732d63692e6f72672f313130352d363630312f7a69702d61726368697665722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/1105-6601/zip-archiver)[![GitHub tag](https://camo.githubusercontent.com/a02cb65f5166ad6f034d49c404eb33a017acb3e82cb0dd28a0d3ff6041f972ac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f313130352d363630312f7a69702d61726368697665722e7376673f6c6162656c3d6c6174657374)](https://packagist.org/packages/tkzo/zip-archiver)[![Packagist](https://camo.githubusercontent.com/694aa643581c8df179195cf7e0bd58850ae8ae605b600fcb8dd897d2122697db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f313130352d363630312f7a69702d61726368697665722e737667)](https://packagist.org/packages/tkzo/zip-archiver)[![Minimum PHP Version](https://camo.githubusercontent.com/ed3d5f316ab7046990f8dbe388251ead80e0b003b22814d531ddbfc332a20cf1/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/97124c5a431846b977f329a6f6482d15e3658592f82f50ab7d3991ed34764495/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f313130352d363630312f7a69702d61726368697665722e737667)](https://packagist.org/packages/tkzo/zip-archiver)

This package is intended for easy creation of ZIP archives.

This package is compliant with [PSR-4](http://www.php-fig.org/psr/4/), [PSR-1](http://www.php-fig.org/psr/1/), and [PSR-2](http://www.php-fig.org/psr/2/). If you notice compliance oversights, please send a patch via pull request.

Installation
------------

[](#installation)

To install `ZipArchiver` you can either clone this repository or you can use composer.

```
composer require tkzo/zip-archiver

```

Usage
-----

[](#usage)

e.g.)

```
use ZipArchiver\Archiver;

// Setup working directory.
$archiveTitle   = 'archive';
$tmpWorkingDir  = md5(uniqid() . $_SERVER['REQUEST_TIME_FLOAT']);
$tmpWorkingPath = sprintf('%s/%s/%s', sys_get_temp_dir(), $tmpWorkingDir, $archiveTitle);

// Make working directory.
@mkdir($tmpWorkingPath, 0777, true);

// Move the files you want to archive to a working directory.
rename('/path/to/file1.ext', sprintf('%s/%s', $tmpWorkingPath, 'file1.ext'));
rename('/path/to/file2.ext', sprintf('%s/%s', $tmpWorkingPath, 'file1.ext'));
rename('/path/to/file3.ext', sprintf('%s/%s', $tmpWorkingPath, 'file1.ext'));

// Sets the output path of the zip archive.
$zipPath = sprintf('%s/%s.zip', $tmpWorkingPath, $archiveTitle);

// Make zip archive.
Archiver::zipDir($tmpWorkingPath, $zipPath);
```

There is a complete example of this in `example/example.php`.

License
-------

[](#license)

[MIT License](http://mit-license.org/)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1746d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34832446?v=4)[Tkzo](/maintainers/1105-6601)[@1105-6601](https://github.com/1105-6601)

---

Top Contributors

[![yzfhiro](https://avatars.githubusercontent.com/u/150792021?v=4)](https://github.com/yzfhiro "yzfhiro (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tkzo-zip-archiver/health.svg)

```
[![Health](https://phpackages.com/badges/tkzo-zip-archiver/health.svg)](https://phpackages.com/packages/tkzo-zip-archiver)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
