<?php
GMP gmp_random_range ( GMP|int|string $min,
GMP|int|string $max )
where,
$min = The lower bound for the random number
$max = The upper bound for the random number
?>
<?php
// For each run of this exercise
// a new result will be issued
$min01 = PHP_INT_MIN;
$max01 = PHP_INT_MAX;
$rnd01 = gmp_random_range($min01, $max01);
echo 'gmp_random_range( ' . $min01 . ', ' . $max01 . ' ) =<br><br>= ' .
gmp_strval($rnd01);
?>
<?php
// A warning or a Fatal error is issued
// by this exercise depending the PHP version
echo 'PHP = ' .PHP_VERSION . '<br><br>';
$min02 = 999;
$max02 = 0;
$rnd02 = gmp_random_range($min02, $max02);
echo 'gmp_random_range( ' . $min02 . ', ' . $max02 . ' ) =<br><br>= ' .
gmp_strval($rnd02);
?>