Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 110 | All time: 9,646 This week: 560 |
Version | License | PHP version | Categories | |||
generateuniquesnumbe 1.0.0 | GNU General Publi... | 5 | PHP 5, Statistics, Math |
Description | Author | |
This class can generate a list of unique numbers. |
<?php
|
<?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 (7) |
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 (7) | / | tests |
File | Role | Description |
---|---|---|
test.php | Example | Example script |
testGenerateUniquesNumbers.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
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.