summaryrefslogtreecommitdiff
path: root/ext/gmp/tests/gmp_php_int_max.phpt
blob: 1f680a14901ec245ac3ef150aaa079510b01eee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--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