elminson / generateuniquesnumbers
This generate an array of uniques numbers in a range
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Type:package
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-11-08 16:16:27 UTC
README
<?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 )