PHPackages                             blibio/combinatorics - 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. blibio/combinatorics

ActiveLibrary

blibio/combinatorics
====================

Simple combination and permutation generators.

v1.1.0(8mo ago)02MITPHPPHP ^8.3CI passing

Since Sep 4Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/blibio/combinatorics)[ Packagist](https://packagist.org/packages/blibio/combinatorics)[ Docs](https://github.com/blibio/combinatorics)[ RSS](/packages/blibio-combinatorics/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

blibio/combinatorics
====================

[](#blibiocombinatorics)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/blibio/combinatorics/blob/main/LICENSE)[![Coverage Status](https://camo.githubusercontent.com/d95e12cea3505e93b644dcf13b7003ae53cd6b179c1de64e3d600feba71614d2/68747470733a2f2f636f6465636f762e696f2f67682f626c6962696f2f636f6d62696e61746f726963732f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/blibio/combinatorics)

Simple PHP 8.3+ [generators](https://php.net/manual/language.generators.overview.php) to create:

- [combinations](https://en.wikipedia.org/wiki/Combination) with or without repetition and
- [permutations](https://en.wikipedia.org/wiki/Permutation) with or without repetition.

---

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

[](#installation)

Install via Composer:

```
composer require blibio/combinatorics
```

Usage
-----

[](#usage)

To use the generators, simply create the kind of object you need, and iterate. E.g.:

```
