PHPackages                             jefhar/fisher-yates - 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. jefhar/fisher-yates

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

jefhar/fisher-yates
===================

A PHP implementation of the Fisher-Yates shuffle

1.0.1(11mo ago)012MITPHPPHP ^8.2

Since Jun 9Pushed 11mo agoCompare

[ Source](https://github.com/jefhar/fisher-yates)[ Packagist](https://packagist.org/packages/jefhar/fisher-yates)[ RSS](/packages/jefhar-fisher-yates/feed)WikiDiscussions master Synced 1mo ago

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

fisher-yates
============

[](#fisher-yates)

A PHP implementation of the [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle) with a deterministic shuffle.

Installing
----------

[](#installing)

This requires a minimum version of PHP 8.2.

Use [Composer](https://getcomposer.org):

```
composer require jefhar/fisher-yates
```

Usage
-----

[](#usage)

```
use Lmc\FisherYates\FisherYates;

$itemsToShuffle = ['a', 'b', 'c', 'd', 'e'];

$fy = new FisherYates($itemsToShuffle);

$result = $fy->shuffle();
```

If you need a deterministic shuffle, you can send a seed to the `shuffle` method:

```
use Lmc\FisherYates\FisherYates;

$seed = 123_456_789;
$itemsToShuffle = ['a', 'b', 'c', 'd', 'e'];
$fy = new FisherYates($itemsToShuffle);

var_dump($fy->shuffle($seed));
```

```
array(5) {
  [0]=>
  string(1) "d"
  [1]=>
  string(1) "a"
  [2]=>
  string(1) "b"
  [3]=>
  string(1) "e"
  [4]=>
  string(1) "c"
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance52

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.8% 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 ~1 days

Total

2

Last Release

336d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e71fe14cc22a111e0e0271c687561a18f5560478493526c3d7c6a12e8314ae75?d=identicon)[jefhar](/maintainers/jefhar)

---

Top Contributors

[![adamkammeyer](https://avatars.githubusercontent.com/u/6913624?v=4)](https://github.com/adamkammeyer "adamkammeyer (21 commits)")[![jefhar](https://avatars.githubusercontent.com/u/22824070?v=4)](https://github.com/jefhar "jefhar (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jefhar-fisher-yates/health.svg)

```
[![Health](https://phpackages.com/badges/jefhar-fisher-yates/health.svg)](https://phpackages.com/packages/jefhar-fisher-yates)
```

###  Alternatives

[vdb/php-spider

A configurable and extensible PHP web spider

1.4k181.0k7](/packages/vdb-php-spider)[igorw/config-service-provider

A config ServiceProvider for Silex with support for php, json and yaml.

215636.5k13](/packages/igorw-config-service-provider)[emadadly/laravel-uuid

laravel uuid a simple, automatic UUID generator for any model based on Laravel.

120415.9k3](/packages/emadadly-laravel-uuid)[ramsey/devtools

A Composer plugin to aid PHP library and application development.

7134.7k26](/packages/ramsey-devtools)[skyronic/laravel-file-generator

Laravel package to help you automate creation of files. Build your own custom generators like 'artisan make:model'.

6748.3k](/packages/skyronic-laravel-file-generator)[outl1ne/nova-media-hub

A Laravel Nova tool for managing media.

4652.0k](/packages/outl1ne-nova-media-hub)

PHPackages © 2026

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