(PHP 8 >= 8.2.0)
Random\Randomizer::nextInt — Get a positive integer
This function is currently not documented; only its argument list is available.
This function has no parameters.
A positive integer between 0 and a maximum value depending on the number of bytes returned from Random\Engine::generate(). The exact maximum can be calculated as 2$engine_bytes * 8 - 1 - 1.
Random\Randomizer::$engine
.
Example #1 Random\Randomizer::nextInt() example
<?php
$r = new \Random\Randomizer();
/ Random "next" integer:
echo $r->nextInt(), "\n";
?>
The above example will output something similar to:
8041689838856078718
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