Random\Randomizer::getInt

Get a uniformly selected integer

&reftitle.description; public `int` `Random\Randomizer::getInt` `int` `min` `int` `max`

&warn.undocumented.func;
&reftitle.parameters;

`min`

- The lowest value to be returned.

`max`

- The highest value to be returned.

&reftitle.returnvalues;

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

&reftitle.errors;

- If `max` is less than `min`, a `ValueError` will be thrown.

&random.engineErrors;

&reftitle.examples;

### `Random\Randomizer::getInt` example

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

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

&example.outputs.similar;

    42

&reftitle.seealso;

- `random_int`
- `Random\Randomizer::getFloat`