PHPackages                             gamebetr/provable - 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. gamebetr/provable

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

gamebetr/provable
=================

Package that provides the ability to create provably fair numbers and shuffles

1.0.0001(5y ago)934021PHPPHP &gt;=7.2CI failing

Since Sep 16Pushed 4y ago2 watchersCompare

[ Source](https://github.com/dbd-net/provable)[ Packagist](https://packagist.org/packages/gamebetr/provable)[ RSS](/packages/gamebetr-provable/feed)WikiDiscussions develop Synced 3d ago

READMEChangelogDependencies (1)Versions (5)Used By (1)

Provable
========

[](#provable)

This package provides the means to create provibly fair random numbers and provably fair random shuffles.

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

[](#installation)

via composer:

```
composer require dbd-net/provable ^1.0

```

Basic Useage
------------

[](#basic-useage)

```
// set some vars
$clientSeed = 'your client seed here';
$serverSeed = 'your server seed here';
$min = 1;
$max = 52;
$type = 'shuffle';

// instanciate the provable class
$provable = new Gamebetr\Provable\Provable($clientSeed, $serverSeed, $min, $max, $type);

// get the results
print $provable->results();
// prints [6,21,19,13,41,28,40,43,2,39,5,24,18,52,46,26,20,7,29,38,23,37,30,31,33,44,22,16,35,48,25,14,45,27,11,8,17,36,51,4,42,15,49,32,3,9,1,47,10,34,50,12]
```

Methods
-------

[](#methods)

### \_\_construct(string $clientSeed = null, string $serverSeed = null, int $min = 0, int $max = 0, string $type = 'number')

[](#__constructstring-clientseed--null-string-serverseed--null-int-min--0-int-max--0-string-type--number)

The class constructor takes the optional parameters, clientSeed, serverSeed, min, max, and type. If clientSeed or serverSeed are not provided, it will generate random seeds automatically. The min and max parameters are the minimum and maximum values of the random number or shuffle. Type is either `number` or `shuffle`.

### static init(string $clientSeed = null, string $serverSeed = null, int $min = 0, int $max = 0, string $type = 'number')

[](#static-initstring-clientseed--null-string-serverseed--null-int-min--0-int-max--0-string-type--number)

The init method is just a static constructor. It allows you to do the following:

```
$provable = Gamebetr\Provable::init()
// returns an instance of Gamebetr\Provable

```

### setClientSeed(string $clientSeed = null)

[](#setclientseedstring-clientseed--null)

This sets the client seed. If no seed is provided, one will be automatically generated. The Provable instance is returned allowing you to chain commands.

### getClientSeed()

[](#getclientseed)

This returns the current client seed.

### setServerSeed(string $serverSeed = null)

[](#setserverseedstring-serverseed--null)

This sets the server seed. If no seed is provided, one will be automatically generated. The Provable instance is returned allowing you to chain commands.

### getServerSeed()

[](#getserverseed)

This returns the current server seed.

### getHashedServerSeed()

[](#gethashedserverseed)

This returns the hashed version of the server seed.

### setMin(int $min)

[](#setminint-min)

This sets the minimum value property. The Provable instance is returned allowing you to chain commands.

### getMin()

[](#getmin)

This returns the current minimum value property.

### setMax(int $max)

[](#setmaxint-max)

This sets the maximum value property. The Provable instance is returned allowing you to chain commands.

### getMax()

[](#getmax)

This returns the current maximum value property.

### setType(string $type)

[](#settypestring-type)

This sets the type property. Allowed values are number and shuffle. The Provable instance is returned allowing you to chain commands.

### getType()

[](#gettype)

This returns the current type property.

### results()

[](#results)

This calculates the random number or shuffle and returns it.

### number(int $minimumNumber = null, int $maximumNumber = null)

[](#numberint-minimumnumber--null-int-maximumnumber--null)

This generates a random number between $minimumNumber and $maximumNumber. If no values are provided, it will use the $min and $max properties of the object.

### shuffle(int $minimumNumber = null, int $maximumNumber = null)

[](#shuffleint-minimumnumber--null-int-maximumnumber--null)

This generates a random shuffle of numbers between $minimumNumber and $maximumNumber. If no values are provided, it will use the $min and $max properties of the object.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~274 days

Total

2

Last Release

2158d ago

PHP version history (2 changes)1.0.0000PHP &gt;=5.3

1.0.0001PHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![swichers](https://avatars.githubusercontent.com/u/5890607?v=4)](https://github.com/swichers "swichers (8 commits)")[![submtd](https://avatars.githubusercontent.com/u/2303288?v=4)](https://github.com/submtd "submtd (5 commits)")[![gamebetr](https://avatars.githubusercontent.com/u/55413277?v=4)](https://github.com/gamebetr "gamebetr (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gamebetr-provable/health.svg)

```
[![Health](https://phpackages.com/badges/gamebetr-provable/health.svg)](https://phpackages.com/packages/gamebetr-provable)
```

###  Alternatives

[yurunsoft/chinese-util

PHP 中文工具包，支持汉字转拼音、拼音分词、简繁互转、数字转换、金额数字转换。

511109.2k3](/packages/yurunsoft-chinese-util)[bnomei/autoloader-for-kirby

Helper to automatically load various Kirby extensions in a plugin

185.7k2](/packages/bnomei-autoloader-for-kirby)

PHPackages © 2026

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