gmp_random


gmp apg

GENERATE a random number.


This function has been DEPRECATED as of PHP 7.2.0

Relying on this function is highly discouraged


Under PHP 8.0.XX this function no longer exists





The number used will be in the interval [ 0, (2 ** n)-1 ].



<?php

GMP gmp_random 
( int $limiter = 20 )


where,

$limiter = The limiter to consider

?>
 

$limiter


The limiter to consider.



  1 EXERCISE   

<?php

if(PHP_VERSION < 8)
{
$gmprnd01d = gmp_random(2);

$gmprnd01dd = gmp_strval($gmprnd01d);

echo 
$gmprnd01dd;
}
else
{
    echo 
'This function is not available!';
}

?>