PHPackages                             jacobemerick/shuffle\_slightly - 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. jacobemerick/shuffle\_slightly

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

jacobemerick/shuffle\_slightly
==============================

v1.0.0(11y ago)114MITPHPPHP &gt;=5.4

Since Jul 1Pushed 11y ago1 watchersCompare

[ Source](https://github.com/jacobemerick/shuffle_slightly)[ Packagist](https://packagist.org/packages/jacobemerick/shuffle_slightly)[ RSS](/packages/jacobemerick-shuffle-slightly/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

shuffle\_slightly
=================

[](#shuffle_slightly)

Function to slightly shuffle an array based on a tolerance parameter.

There may come a time when you want to shuffle an array but you don't want to completely ignore the order. This function, which behaves much like the native [shuffle](http://us1.php.net/manual/en/function.shuffle.php), will perform a slight shuffle.

For example, if you want to shuffle a simple array but you don't want to move any elements more than 2 positions away from their start, just do this.

```
$array = ['a', 'b', 'c', 'd', 'e'];
jacobemerick\shuffle_slightly($array, 2);
```

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

[](#installation)

Through [composer](http://getcomposer.org):

```
$ composer require jacobemerick/shuffle_slightly:~1.0
```

More Information
----------------

[](#more-information)

I wrote a [blog post](http://blog.jacobemerick.com/web-development/slightly-shuffled/) talking about the reasoning, build, and some extra information about shuffling algorithms.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

4330d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a4eb553ed7677c6aa2c5adb9d20191557e64369c14a9d4b2371c924c4517dff?d=identicon)[jacobemerick](/maintainers/jacobemerick)

---

Top Contributors

[![jacobemerick](https://avatars.githubusercontent.com/u/527814?v=4)](https://github.com/jacobemerick "jacobemerick (3 commits)")

### Embed Badge

![Health badge](/badges/jacobemerick-shuffle-slightly/health.svg)

```
[![Health](https://phpackages.com/badges/jacobemerick-shuffle-slightly/health.svg)](https://phpackages.com/packages/jacobemerick-shuffle-slightly)
```

###  Alternatives

[robicch/jquery-gantt

Twproject Gantt editor is a free online tool for creating and sharing Gantts

2.3k157.7k](/packages/robicch-jquery-gantt)[brickrouge/brickrouge

A toolkit to create HTML elements

301.8k6](/packages/brickrouge-brickrouge)

PHPackages © 2026

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