Annotation of embedaddon/php/ext/gmp/tests/028.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: gmp_random() basic tests
3: --SKIPIF--
4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
5: --FILE--
6: <?php
7:
8: var_dump(gmp_strval(gmp_random()));
9: var_dump(gmp_strval(gmp_random(-1)));
10: var_dump(gmp_strval(gmp_random(0)));
11: var_dump(gmp_strval(gmp_random(10)));
12: var_dump(gmp_strval(gmp_random("-10")));
13: var_dump(gmp_strval(gmp_random(-10)));
14:
15: var_dump(gmp_random(array()));
16: var_dump(gmp_random(array(),1));
17: var_dump(gmp_random(""));
18: var_dump(gmp_random("test"));
19:
20: echo "Done\n";
21: ?>
22: --EXPECTF--
23: string(%d) "%d"
24: string(%d) "%d"
25: string(1) "%d"
26: string(%d) "%d"
27: string(%d) "%d"
28: string(%d) "%d"
29:
30: Warning: gmp_random() expects parameter 1 to be long, array given in %s on line %d
31: NULL
32:
33: Warning: gmp_random() expects at most 1 parameter, 2 given in %s on line %d
34: NULL
35:
36: Warning: gmp_random() expects parameter 1 to be long, string given in %s on line %d
37: NULL
38:
39: Warning: gmp_random() expects parameter 1 to be long, string given in %s on line %d
40: NULL
41: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>