| Recommend this page to a friend! | 
| Info | Example | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 110 | All time:  9,651 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
)
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Doc. | Documentation | |||
| Example | Test file | |||
| / | tests | 
| File | Role | Description | 
|---|---|---|
|    | 
Example | Example script | 
|    | 
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. | 
| generateuniquesnumbe-2020-04-16.zip 10KB | |
| generateuniquesnumbe-2020-04-16.tar.gz 9KB | |
| 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.