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