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