![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
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
)
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Example | Test file |
![]() |
/ | tests |
File | Role | Description |
---|---|---|
![]() ![]() |
Example | Example script |
![]() |
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.