xref: /PHP-8.0/ext/gmp/tests/gmp_php_int_max.phpt (revision 5138f3ba)
1--TEST--
2PHP_INT_MAX tests
3--SKIPIF--
4<?php
5if (!extension_loaded("gmp")) print "skip";
6if (PHP_INT_SIZE != 8) print "skip";
7?>
8--FILE--
9<?php
10
11var_dump(gmp_mul(PHP_INT_MAX, PHP_INT_MAX));
12var_dump(gmp_add(PHP_INT_MAX, PHP_INT_MAX));
13var_dump(gmp_mul(PHP_INT_MAX, PHP_INT_MIN));
14?>
15DONE
16--EXPECTF--
17object(GMP)#%d (%d) {
18  ["num"]=>
19  string(38) "85070591730234615847396907784232501249"
20}
21object(GMP)#%d (%d) {
22  ["num"]=>
23  string(20) "18446744073709551614"
24}
25object(GMP)#%d (%d) {
26  ["num"]=>
27  string(39) "-85070591730234615856620279821087277056"
28}
29DONE
30