php-src/ext/gmp/tests/gmp_php_int_max.phpt
Nikita Popov 5138f3ba22 Skip 64bit test on 32bit
Also minor type improvements
2014-09-02 18:42:39 +02:00

30 lines
557 B
PHP

--TEST--
PHP_INT_MAX tests
--SKIPIF--
<?php
if (!extension_loaded("gmp")) print "skip";
if (PHP_INT_SIZE != 8) print "skip";
?>
--FILE--
<?php
var_dump(gmp_mul(PHP_INT_MAX, PHP_INT_MAX));
var_dump(gmp_add(PHP_INT_MAX, PHP_INT_MAX));
var_dump(gmp_mul(PHP_INT_MAX, PHP_INT_MIN));
?>
DONE
--EXPECTF--
object(GMP)#%d (%d) {
["num"]=>
string(38) "85070591730234615847396907784232501249"
}
object(GMP)#%d (%d) {
["num"]=>
string(20) "18446744073709551614"
}
object(GMP)#%d (%d) {
["num"]=>
string(39) "-85070591730234615856620279821087277056"
}
DONE