1--TEST-- 2gmp_mod tests() 3--SKIPIF-- 4<?php if (!extension_loaded("gmp")) print "skip"; ?> 5--FILE-- 6<?php 7 8var_dump(gmp_mod()); 9var_dump(gmp_mod("")); 10var_dump(gmp_mod("","")); 11var_dump(gmp_mod(0,1)); 12var_dump(gmp_mod(0,-1)); 13var_dump(gmp_mod(-1,0)); 14 15var_dump(gmp_mod(array(), array())); 16 17$a = gmp_init("-100000000"); 18$b = gmp_init("353467"); 19 20var_dump(gmp_mod($a, $b)); 21 22echo "Done\n"; 23?> 24--EXPECTF-- 25Warning: gmp_mod() expects exactly 2 parameters, 0 given in %s on line %d 26NULL 27 28Warning: gmp_mod() expects exactly 2 parameters, 1 given in %s on line %d 29NULL 30bool(false) 31int(0) 32resource(%d) of type (GMP integer) 33 34Warning: gmp_mod(): Zero operand not allowed in %s on line %d 35bool(false) 36 37Warning: gmp_mod(): Unable to convert variable to GMP - wrong type in %s on line %d 38bool(false) 39resource(%d) of type (GMP integer) 40Done 41