PHPackages                             selective/rar - 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. selective/rar

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

selective/rar
=============

RAR file reader

0.5.0(11mo ago)2111.1k↓30.8%6[1 PRs](https://github.com/selective-php/rar/pulls)1MITPHPPHP 8.1.\* || 8.2.\* || 8.3.\* || 8.4.\*CI passing

Since Aug 6Pushed 11mo ago2 watchersCompare

[ Source](https://github.com/selective-php/rar)[ Packagist](https://packagist.org/packages/selective/rar)[ Docs](https://github.com/selective-php/rar)[ RSS](/packages/selective-rar/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (1)

selective/rar
=============

[](#selectiverar)

RAR file reader for PHP.

[![Latest Version on Packagist](https://camo.githubusercontent.com/05dc368b80cf1f4797e20d055b2f5795afbc0ea1ae9ff84dbc37bee90cfd9566/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73656c6563746976652d7068702f7261722e737667)](https://packagist.org/packages/selective/rar)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Build Status](https://github.com/selective-php/rar/workflows/build/badge.svg)](https://github.com/selective-php/rar/actions)[![Total Downloads](https://camo.githubusercontent.com/405b194ecb0890b9055ad8800aa408cc98d80c0c093f3f1db1626e5747855831/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73656c6563746976652f7261722e737667)](https://packagist.org/packages/selective/rar/stats)

Features
--------

[](#features)

- Read RAR file information
- RAR 5 archive format
- RAR 4 archive format
- No dependencies
- Very fast

Note: This package does not support extracting / unpacking rar archives.

Requirements
------------

[](#requirements)

- PHP 8.1 - 8.4

> The [PECL RAR package](https://www.php.net/manual/en/book.rar.php) is **NOT** required

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

[](#installation)

```
composer require selective/rar

```

Usage
-----

[](#usage)

### Open RAR file

[](#open-rar-file)

```
use Selective\Rar\RarFileReader;
use SplFileObject;

$rarFileReader = new RarFileReader();
$rarArchive = $rarFileReader->openFile(new SplFileObject('test.rar'));

foreach ($rarArchive->getEntries() as $entry) {
    echo $entry->getName() . "\n";
}
```

### Open in-memory RAR file

[](#open-in-memory-rar-file)

```
use Selective\Rar\RarFileReader;
use SplTempFileObject;

$file = new SplTempFileObject();
$file->fwrite('my binary rar content');

$rarFileReader = new RarFileReader();
$rarArchive = $rarFileReader->openFile($file);

foreach ($rarArchive->getEntries() as $entry) {
    echo $entry->getName() . "\n";
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance52

Moderate activity, may be stable

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 97.1% 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

Every ~534 days

Total

5

Last Release

337d ago

PHP version history (4 changes)0.1.0PHP ^7.2

0.2.0PHP ^7.3 || ^8.0

0.4.0PHP ^8.1

0.5.0PHP 8.1.\* || 8.2.\* || 8.3.\* || 8.4.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/89d408d7f6ed65cdbeba70a2da2d0a8a1135fc37ebc07c44989f509221cc91bd?d=identicon)[odan](/maintainers/odan)

---

Top Contributors

[![odan](https://avatars.githubusercontent.com/u/781074?v=4)](https://github.com/odan "odan (33 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

phprarrar-archivesrar-filesrar-formatarchivefilereaderrar

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/selective-rar/health.svg)

```
[![Health](https://phpackages.com/badges/selective-rar/health.svg)](https://phpackages.com/packages/selective-rar)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.2k](/packages/league-flysystem)[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[league/flysystem-local

Local filesystem adapter for Flysystem.

225231.8M39](/packages/league-flysystem-local)[wapmorgan/unified-archive

UnifiedArchive - an archive manager with unified interface of working with all popular archive formats (zip/7z/rar/gz/bz2/xz/cab/tar/tar.gz/tar.bz2/tar.x/tar.Z/...) for PHP with ability for listing, reading, extracting and creation + built-in console archive manager.

2791.6M7](/packages/wapmorgan-unified-archive)[raulfraile/distill

Smart compressed files extractor

228190.4k9](/packages/raulfraile-distill)

PHPackages © 2026

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