PHPackages                             stivehu/yii2-rangecomp - 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. stivehu/yii2-rangecomp

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

stivehu/yii2-rangecomp
======================

A strictly increasing sequence arrays compressing tool. For example: {1,2,3,4,5}=&gt;{"1-5"}

1.0(10y ago)01361GPL-3.0+PHP

Since May 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/stivehu/yii2-rangecomp)[ Packagist](https://packagist.org/packages/stivehu/yii2-rangecomp)[ RSS](/packages/stivehu-yii2-rangecomp/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Range compression-decomression
==============================

[](#range-compression-decomression)

Strictly increasing sequences arrays compressing tool. For example: {1,2,3,4,5}=&gt;{"1-5"}

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist stivehu/yii2-rangecomp "*"

```

or add

```
"stivehu/yii2-rangecomp": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
