Home
last modified time | relevance | path

Searched refs:mt_rand (Results 26 – 45 of 45) sorted by path

12

/php-src/ext/random/
H A Drandom.c505 PHP_FUNCTION(mt_rand) argument
H A Drandom.stub.php27 function mt_rand(int $min = UNKNOWN, int $max = UNKNOWN): int {} function
H A Drandom_arginfo.h130 ZEND_FUNCTION(mt_rand);
162 ZEND_FE(mt_rand, arginfo_mt_rand)
/php-src/ext/random/tests/01_functions/
H A Dbug46587.phpt2 Bug #46587 (mt_rand() does not check that max is greater than min).
6 var_dump(mt_rand(3,8));
8 var_dump(mt_rand(8,3));
17 mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min)
H A Dbug75170.phpt2 Bug #75170: mt_rand() bias on 64-bit machines
14 $halves[(mt_rand(0, $max - 1) >> 1) & 1]++;
25 $halves[(int) (mt_rand(0, $max - 1) / ($max / 2))]++;
H A Dbug75514.phpt2 Bug #75514 mt_rand returns value outside [$min,$max]
6 var_dump(mt_rand(0,999999999), mt_rand(0,999));
H A Dmt_rand_basic.phpt2 Test mt_rand() - basic function test mt_rand()
9 $res = mt_rand();
39 $res = mt_rand($min[$x], $max[$x]);
54 mt_rand() tests with default min and max value (i.e 0 thru 2147483647)
57 mt_rand() tests with defined min and max value
H A Dmt_rand_value.phpt2 Test mt_rand() output
9 echo mt_rand().PHP_EOL;
15 $x ^= mt_rand();
23 echo mt_rand().PHP_EOL;
29 $x ^= mt_rand();
H A Dmt_srand_unknown_mode.phpt7 var_dump(mt_rand());
10 var_dump(mt_rand());
13 var_dump(mt_rand());
16 var_dump(mt_rand());
/php-src/ext/random/tests/03_randomizer/
H A Dcompatibility_mt_rand.phpt2 Random: Randomizer: The Mt19937 engine is a drop-in replacement for mt_rand()
15 if ($randomizer->nextInt() !== mt_rand()) {
21 if ($randomizer->getInt(0, $i) !== mt_rand(0, $i)) {
32 if ($randomizer->nextInt() !== mt_rand()) {
38 if ($randomizer->getInt(0, $i) !== mt_rand(0, $i)) {
/php-src/ext/reflection/tests/
H A DReflectionConstant_double_construct.phpt9 $r = new ReflectionConstant('C' . mt_rand(1, 1));
12 $r->__construct('C' . mt_rand(2, 2));
/php-src/ext/sodium/tests/
H A Dcrypto_auth.phpt29 $badmsg[$i=mt_rand(0, 999)] = \chr(
31 1 << mt_rand(0, 7)
/php-src/ext/standard/tests/general_functions/
H A Drand.phpt2 rand() and mt_rand() tests
6 var_dump(mt_rand());
7 var_dump(mt_rand(-1,1));
8 var_dump(mt_rand(0,3));
/php-src/ext/sysvmsg/tests/
H A D005.phpt14 $id = ftok(__FILE__, chr(mt_rand(0, 255))); } while (msg_queue_exists($id));
/php-src/ext/xsl/tests/
H A DXSLTProcessor_callables.phpt35 $proc->registerPhpFunctions(str_repeat("var_dump", mt_rand(1, 1) /* defeat SCCP */));
H A DgetParameter.phpt17 $xslt->setParameter('', 'foo', str_repeat('"abcd"', mt_rand(2, 2) /* defeat SCCP */));
/php-src/ext/zlib/tests/
H A Dbug75273.phpt15 $j = mt_rand(0, 255);
/php-src/sapi/embed/
H A DREADME.md58 The following example calls `mt_rand()` and `var_dump()`s the return value.
73 zend_string *func_name = zend_string_init(ZEND_STRL("mt_rand"), 0);
/php-src/sapi/fpm/tests/
H A Dfcgi.inc777 $id = mt_rand(1, (1 << 16) - 1);
/php-src/sapi/phpdbg/tests/
H A Dbug73927.phpt37 $example[] = mt_rand(1, 10000);
45 return mt_rand(1, 1000);

Completed in 30 milliseconds

12