PHPackages                             gemorroj/archive7z - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gemorroj/archive7z

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gemorroj/archive7z
==================

7z cli wrapper

5.9.0(3mo ago)103963.0k↓11.5%20[9 issues](https://github.com/Gemorroj/Archive7z/issues)1LGPL-3.0-or-laterPHPPHP &gt;=8.2CI failing

Since Feb 6Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/Gemorroj/Archive7z)[ Packagist](https://packagist.org/packages/gemorroj/archive7z)[ RSS](/packages/gemorroj-archive7z/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (16)Used By (1)

Wrapper 7-zip (p7zip)
=====================

[](#wrapper-7-zip-p7zip)

[![License](https://camo.githubusercontent.com/43575791e444f8c4fff66c636691977a9c383ed5906a82fb8e3b95032770cfb1/68747470733a2f2f706f7365722e707567782e6f72672f67656d6f72726f6a2f61726368697665377a2f6c6963656e7365)](https://packagist.org/packages/gemorroj/archive7z)[![Latest Stable Version](https://camo.githubusercontent.com/0fbfd8d171113f1df860a415d47a05ae5a900e1e6fe52581364fa55d59675730/68747470733a2f2f706f7365722e707567782e6f72672f67656d6f72726f6a2f61726368697665377a2f762f737461626c65)](https://packagist.org/packages/gemorroj/archive7z)[![Continuous Integration](https://github.com/Gemorroj/Archive7z/workflows/Continuous%20Integration/badge.svg)](https://github.com/Gemorroj/Archive7z/actions?query=workflow%3A%22Continuous+Integration%22)

### Features:

[](#features)

- Supported all 7-zip formats:
    - Packing / unpacking: `7z`, `XZ`, `BZIP2`, `GZIP`, `TAR`, `ZIP` and `WIM`.
    - Unpacking only: `APFS`, `AR`, `ARJ`, `Base64`, `CAB`, `CHM`, `CPIO`, `CramFS`, `DMG`, `EXT`, `FAT`, `GPT`, `HFS`, `IHEX`, `ISO`, `LZH`, `LZMA`, `MBR`, `MSI`, `NSIS`, `NTFS`, `QCOW2`, `RAR`, `RPM`, `SquashFS`, `UDF`, `UEFI`, `VDI`, `VHD`, `VHDX`, `VMDK`, `XAR` and `Z`.
- List files and directories
- Get contents of any file from archive
- Delete files or directories
- Add files or directories

### Requirements:

[](#requirements)

- PHP &gt;= 8.2
- allow [proc\_open](https://www.php.net/proc_open) function
- for Windows: 7-zip &gt;= 7.30 ()
- for Linux/MacOs: 7-zip &gt;= 21.01 or p7zip &gt;= 9.38 ()

### Installation:

[](#installation)

```
composer require gemorroj/archive7z
```

### Notes:

[](#notes)

-
- Correctly works only with filenames in UTF-8 encoding [\#15](https://github.com/Gemorroj/Archive7z/issues/15).

### Recommendations:

[](#recommendations)

Archive7z focuses on wrapping up the original 7-zip features. But it is not always convenient to use in your application. Therefore, we recommend that you always create your own wrapper class over Archive7z with the addition of higher-level logic.

### Example:

[](#example)

```
