2017 © Pedro Peláez
 

library fisher-yates-shuffle

The implementation of Fisher-Yates shuffle Algorithm.

image

jp3cki/fisher-yates-shuffle

The implementation of Fisher-Yates shuffle Algorithm.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

fisher-yates-shuffle

Simple implementation of Fisher-Yates Shuffle algorithm., (*1)

REQUIREMENTS

  • PHP 5.4 or later (strongly recommended PHP 5.6 or later)
  • Composer

USAGE

  1. Install via Composer., (*2)

    $ composer.phar require "jp3cki/fisher-yates-shuffle", (*3)

  2. Use jp3cki\fisherYatesShuffle\shuffle function., (*4)

PHP 5.6 or later

<?php
require_once(__DIR__ . '/vendor/autoload.php');

use function jp3cki\fisherYatesShuffle\shuffle as fy_shuffle;

$list = range(1, 10);

fy_shuffle($list);

var_dump($list);

PHP 5.4 or 5.5

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$list = range(1, 10);

\jp3cki\fisherYatesShuffle\shuffle::shuffle($list);

var_dump($list);

LICENSE

Released under the Unlicense. It means this library is a public domain software., (*5)

The Versions

03/02 2016

dev-master

9999999-dev

The implementation of Fisher-Yates shuffle Algorithm.

  Sources   Download

Unlicense

The Requires

 

array random shuffle

03/02 2016

v1.0.0

1.0.0.0

The implementation of Fisher-Yates shuffle Algorithm.

  Sources   Download

Unlicense

The Requires

 

array random shuffle