forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgmp_random.phpt
60 lines (44 loc) · 1.58 KB
/
gmp_random.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--TEST--
gmp_random() basic tests
--SKIPIF--
<?php if (!extension_loaded("gmp")) print "skip"; ?>
--FILE--
<?php
var_dump(gmp_strval(gmp_random()));
var_dump(gmp_strval(gmp_random(-1)));
var_dump(gmp_strval(gmp_random(0)));
var_dump(gmp_strval(gmp_random(10)));
var_dump(gmp_strval(gmp_random("-10")));
var_dump(gmp_strval(gmp_random(-10)));
var_dump(gmp_random(array()));
var_dump(gmp_random(array(),1));
var_dump(gmp_random(""));
var_dump(gmp_random("test"));
echo "Done\n";
?>
--EXPECTF--
Deprecated: Function gmp_random() is deprecated in %s on line %d
string(%d) "%d"
Deprecated: Function gmp_random() is deprecated in %s on line %d
string(%d) "%d"
Deprecated: Function gmp_random() is deprecated in %s on line %d
string(1) "%d"
Deprecated: Function gmp_random() is deprecated in %s on line %d
string(%d) "%d"
Deprecated: Function gmp_random() is deprecated in %s on line %d
string(%d) "%d"
Deprecated: Function gmp_random() is deprecated in %s on line %d
string(%d) "%d"
Deprecated: Function gmp_random() is deprecated in %s on line %d
Warning: gmp_random() expects parameter 1 to be integer, array given in %s on line %d
NULL
Deprecated: Function gmp_random() is deprecated in %s on line %d
Warning: gmp_random() expects at most 1 parameter, 2 given in %s on line %d
NULL
Deprecated: Function gmp_random() is deprecated in %s on line %d
Warning: gmp_random() expects parameter 1 to be integer, string given in %s on line %d
NULL
Deprecated: Function gmp_random() is deprecated in %s on line %d
Warning: gmp_random() expects parameter 1 to be integer, string given in %s on line %d
NULL
Done