Random\Randomizer::getInt

(PHP 8 >= 8.2.0)

Random\Randomizer::getIntGet a uniformly selected integer

Descrizione

public Random\Randomizer::getInt(int $min, int $max): int

Avviso

Questa funzione, al momento non è documentata; è disponibile soltanto la lista degli argomenti.

Elenco dei parametri

min

The lowest value to be returned.

max

The highest value to be returned.

Valori restituiti

A uniformly selected integer from the closed interval [min, max]. Both min and max are possible return values.

Errori/Eccezioni

Esempi

Example #1 Random\Randomizer::getInt() example

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

// Random integer in range:
echo $r->getInt(1, 100), "\n";
?>

Il precedente esempio visualizzerà qualcosa simile a:

42

Vedere anche:

add a note

User Contributed Notes

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