File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
ext/standard/tests/general_functions Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,21 @@ var_dump(rand(0,3));
13
13
14
14
var_dump (srand ());
15
15
var_dump (srand (-1 ));
16
+ try {
17
+ srand (mode: MT_RAND_MT19937 );
18
+ } catch (Error $ e ) {
19
+ echo $ e ->getMessage () . "\n" ;
20
+ }
16
21
17
22
var_dump (mt_srand ());
18
23
var_dump (mt_srand (-1 ));
19
24
25
+ try {
26
+ mt_srand (mode: MT_RAND_MT19937 );
27
+ } catch (Error $ e ) {
28
+ echo $ e ->getMessage () . "\n" ;
29
+ }
30
+
20
31
var_dump (getrandmax ());
21
32
22
33
var_dump (mt_getrandmax ());
@@ -32,8 +43,10 @@ int(%i)
32
43
int(%d)
33
44
NULL
34
45
NULL
46
+ srand(): Argument #1 ($seed) must be passed explicitly, because the default value is not known
35
47
NULL
36
48
NULL
49
+ mt_srand(): Argument #1 ($seed) must be passed explicitly, because the default value is not known
37
50
int(%d)
38
51
int(%d)
39
52
Done
You can’t perform that action at this time.
0 commit comments