Annotation of embedaddon/php/ext/gmp/tests/038.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: gmp_scan1() basic tests
3: --SKIPIF--
4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
5: --FILE--
6: <?php
7:
8: var_dump(gmp_scan1("434234", -10));
9: var_dump(gmp_scan1("434234", 1));
10: var_dump(gmp_scan1(4096, 0));
11: var_dump(gmp_scan1("1000000000", 5));
12: var_dump(gmp_scan1("1000000000", 200));
13:
14: $n = gmp_init("24234527465274");
15: var_dump(gmp_scan1($n, 10));
16:
17: var_dump(gmp_scan1(array(), 200));
18: var_dump(gmp_scan1(array()));
19: var_dump(gmp_scan1());
20:
21: echo "Done\n";
22: ?>
23: --EXPECTF--
24: Warning: gmp_scan1(): Starting index must be greater than or equal to zero in %s on line %d
25: bool(false)
26: int(1)
27: int(12)
28: int(9)
29: int(-1)
30: int(10)
31:
32: Warning: gmp_scan1(): Unable to convert variable to GMP - wrong type in %s on line %d
33: bool(false)
34:
35: Warning: gmp_scan1() expects exactly 2 parameters, 1 given in %s on line %d
36: NULL
37:
38: Warning: gmp_scan1() expects exactly 2 parameters, 0 given in %s on line %d
39: NULL
40: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>