Annotation of embedaddon/php/ext/gmp/tests/040.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: gmp_init() basic tests
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("gmp")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: var_dump(gmp_init("98765678"));
                      9: var_dump(gmp_strval(gmp_init("98765678")));
                     10: var_dump(gmp_strval(gmp_init()));
                     11: var_dump(gmp_init());
                     12: var_dump(gmp_init(1,2,3,4));
                     13: var_dump(gmp_init(1,-1));
                     14: var_dump(gmp_init("",36));
                     15: var_dump(gmp_init("foo",3));
                     16: var_dump(gmp_strval(gmp_init("993247326237679187178",3)));
                     17: 
                     18: echo "Done\n";
                     19: ?>
                     20: --EXPECTF--    
                     21: resource(%d) of type (GMP integer)
                     22: string(8) "98765678"
                     23: 
                     24: Warning: gmp_init() expects at least 1 parameter, 0 given in %s on line %d
                     25: 
                     26: Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in %s on line %d
                     27: bool(false)
                     28: 
                     29: Warning: gmp_init() expects at least 1 parameter, 0 given in %s on line %d
                     30: NULL
                     31: 
                     32: Warning: gmp_init() expects at most 2 parameters, 4 given in %s on line %d
                     33: NULL
                     34: 
                     35: Warning: gmp_init(): Bad base for conversion: -1 (should be between 2 and %d) in %s on line %d
                     36: bool(false)
                     37: bool(false)
                     38: bool(false)
                     39: string(1) "0"
                     40: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>