Download .zip |
Info | Example | View files (7) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2020-04-16 (7 days ago) | Not yet rated by the users | Total: Not yet counted | Not yet ranked |
Version | License | PHP version | Categories | |||
generateuniquesnumbe 1.0 | GNU General Publi... | 5 | PHP 5, Statistics, Math |
Description | Author | |
This class can generate a list of unique numbers. |
|
<?php
require_once __DIR__ . '/vendor/autoload.php'; // Autoload files using Composer autoload
use Elminson\GenerateUniquesNumbers;
$array = [1, 2, 3, 4];
$gen = new generateUniqueNumbers();
$gen->setMax(10);
$gen->setExclude($array);
$gen->setTopRandomNumber(5);
$gen->generate();
print_r($gen->getCurrentNumbers());
//Output
Array
(
[0] => 0
[1] => 9
[2] => 6
[3] => 10
[4] => 5
)
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
tests (2 files) | ||||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
README.md | Doc. | Documentation | ||
test.php | Example | Test file |
Files | / | tests |
File | Role | Description |
---|---|---|
test.php | Example | Example script |
testGenerateUniquesNumbers.php | Class | Class source |
Version Control | Unique User Downloads | |||||||
85% |
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.