(PHP 8 >= 8.2.0)
Random\Randomizer::getInt — Get a uniformly selected integer
This function is currently not documented; only its argument list is available.
min
The lowest value to be returned.
max
The highest value to be returned.
A uniformly selected integer from the closed interval
[min
, max
]. Both
min
and max
are
possible return values.
max
is less than min
, a
ValueError will be thrown.
Random\Randomizer::$engine
.
Example #1 Random\Randomizer::getInt() example
<?php
$r = new \Random\Randomizer();
/ Random integer in range:
echo $r->getInt(1, 100), "\n";
?>
The above example will output something similar to:
42
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant