1--TEST--
2rand() and mt_rand() tests
3--FILE--
4<?php
5
6var_dump(mt_rand());
7var_dump(mt_rand(-1,1));
8var_dump(mt_rand(0,3));
9
10var_dump(rand());
11var_dump(rand(-1,1));
12var_dump(rand(0,3));
13
14var_dump(srand());
15var_dump(srand(-1));
16
17var_dump(mt_srand());
18var_dump(mt_srand(-1));
19
20var_dump(getrandmax());
21
22var_dump(mt_getrandmax());
23
24echo "Done\n";
25?>
26--EXPECTF--
27int(%d)
28int(%i)
29int(%d)
30int(%d)
31int(%i)
32int(%d)
33NULL
34NULL
35NULL
36NULL
37int(%d)
38int(%d)
39Done
40