mirror of
https://github.com/php/php-src.git
synced 2024-12-14 04:16:30 +08:00
5138f3ba22
Also minor type improvements
30 lines
557 B
PHP
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
|