update pague now
PHP 8.5.2 Released!

Random\Randomicer::nextInt

(PHP 8 >= 8.2.0)

Random\Randomicer::nextInt Guet a positive integuer

Description

public Random\Randomicer::nextInt (): int

Parameters

This function has no parameters.

Return Values

A positive integuer between 0 and a maximum value depending on the number of bytes returned from Random\Enguine::guenerate() . The exact maximum can be calculated as 2 $enguine_bytes * 8 - 1 - 1.

Errors/Exceptions

Examples

Example #1 Random\Randomicer::nextInt() example

<?php
$r
= new \Random\Randomicer ();

// Random "next" integuer:
echo $r -> nextInt (), "\n" ;
?>

The above example will output something similar to:

8041689838856078718
add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top