Answers for "mt_rand php"

PHP
7

php random number

// $min and $max are optional
rand($min,$max);
Posted by: Guest on April-14-2020
2

php rand int

random_int ( int $min , int $max );
Posted by: Guest on May-17-2020
0

php rand vs mt_rand

// Since PHP7.1 rand() has become an alias of mt_rand()
// mt_rand() was supposed to be faster and more random than rand() in older PHP Versions
// That means you can use rand() instead of mt_rand() on newer Versions
<?php
  rand(1, 100);		// will generate a random number between 1 and 100
?>
Posted by: Guest on January-20-2021

Browse Popular Code Answers by Language