PHPackages                             lunkkun/permutations-generator - 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. [Caching](/categories/caching)
4. /
5. lunkkun/permutations-generator

ActiveLibrary[Caching](/categories/caching)

lunkkun/permutations-generator
==============================

A PHP Generator that generates all possible permutations for a given array of values.

v2.0.0(6y ago)0119MITPHPPHP &gt;=7.2CI failing

Since Oct 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lunkkun/php-permutations-generator)[ Packagist](https://packagist.org/packages/lunkkun/permutations-generator)[ Docs](https://github.com/lunkkun/php-permutations-generator)[ RSS](/packages/lunkkun-permutations-generator/feed)WikiDiscussions master Synced today

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

PHP Permutations Generator
==========================

[](#php-permutations-generator)

Summary
-------

[](#summary)

A PHP Generator that generates all possible permutations for a given array of values.

### Important note

[](#important-note)

I've optimized the code for performance. Therefore, the order in which the permutations are generated, might differ from what you might expect. To get the permutations in ascending order, you can `reverse()` every result you get from the generator.

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

[](#installation)

With composer:

```
composer require lunkkun/permutations-generator
```

Usage
-----

[](#usage)

```
