PHPackages                             rekmixa/range-set - 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. rekmixa/range-set

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

rekmixa/range-set
=================

Lightweight PHP library for managing sets of integers with automatic interval merging.

v0.1.0(6mo ago)00MITPHPPHP ^8.5

Since Feb 13Pushed 6mo agoCompare

[ Source](https://github.com/rekmixa/range-set)[ Packagist](https://packagist.org/packages/rekmixa/range-set)[ RSS](/packages/rekmixa-range-set/feed)WikiDiscussions master Synced yesterday

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

range-set
=========

[](#range-set)

[![Packagist Version](https://camo.githubusercontent.com/3af078b6cf319f5ccc7202f0d68aad81b6e4e2e9eb884ebf6cf1cd4c0dc60030/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72656b6d6978612f72616e67652d7365742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rekmixa/range-set)[![License](https://camo.githubusercontent.com/e358a35fa727fefad7f667cc8b49ef37523a6e9aa2181626f26b56ea106f82e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72656b6d6978612f72616e67652d7365742e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

`RangeSet` is a lightweight PHP library for managing sets of integers with automatic interval merging.
It efficiently stores consecutive numbers as ranges, supports fast membership checks, and allows iterating over all numbers in ascending order.

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

[](#installation)

Install via Composer:

```
composer require rekmixa/range-set
```

Usage
-----

[](#usage)

```
