PHPackages                             ksk88/weighted-lottery-php - 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. ksk88/weighted-lottery-php

ActiveLibrary

ksk88/weighted-lottery-php
==========================

weighted-lottery-php provides a not equality shuffle function. Determine is based on each choice's proportion of the total weight.

65.9k↑18.4%1[1 issues](https://github.com/ksk88/weighted-lottery-php/issues)PHP

Since Feb 11Pushed 11y ago2 watchersCompare

[ Source](https://github.com/ksk88/weighted-lottery-php)[ Packagist](https://packagist.org/packages/ksk88/weighted-lottery-php)[ RSS](/packages/ksk88-weighted-lottery-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

weighted-lottery-php
====================

[](#weighted-lottery-php)

weighted-lottery-php provides a not equality shuffle function. Determine is based on each choice's proportion of the total weight.

Installation
============

[](#installation)

To install weighted-lottery-php with Composer, just add the following to your composer.json file:

```
// composer.json
{
    "require-dev": {
        "ksk88/weighted-lottery-php": "dev-master"
    }
}
```

Then, you can install the new dependencies by running Composer’s update command from the directory where your `composer.json` file is located:

```
# install
$ php composer.phar install --dev
# update
$ php composer.phar update ksk88/weighted-lottery-php --dev

# or you can simply execute composer command if you set it to
# your PATH environment variable
$ composer install --dev
$ composer update ksk88/weighted-lottery-php --dev
```

You can see this library on [Packagist](https://packagist.org/packages/ksk88/weighted-lottery-php).

Composer installs autoloader at `./vendor/autoloader.php`. If you use weighted-lottery-php in your php script, add:

```
require_once 'vendor/autoload.php';
```

If you use Symfony2, autoloader has to be detected automatically.

Or you can use git clone command:

```
# HTTP
$ git clone https://github.com/ksk88/weighted-lottery-php.git
# SSH
$ git clone git@github.com:ksk88/weighted-lottery-php.git
```

Example
=======

[](#example)

```
