Skip to content

Commit fe894c2

Browse files
PHP_INT_MIN and _MAX tests
1 parent a2bbc6f commit fe894c2

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (32-bit)
3+
--SKIPIF--
4+
<?php if (PHP_INT_SIZE !== 4)
5+
die("skip this test is for 32-bit platforms only"); ?>
6+
--FILE--
7+
<?php
8+
9+
var_dump(PHP_INT_MIN);
10+
var_dump(PHP_INT_MAX);
11+
var_dump(PHP_INT_SIZE);
12+
13+
?>
14+
--EXPECT--
15+
int(-2147483648)
16+
int(2147483647)
17+
int(4)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (64-bit)
3+
--SKIPIF--
4+
<?php if (PHP_INT_SIZE !== 8)
5+
die("skip this test is for 64-bit platforms only"); ?>
6+
--FILE--
7+
<?php
8+
9+
var_dump(PHP_INT_MIN);
10+
var_dump(PHP_INT_MAX);
11+
var_dump(PHP_INT_SIZE);
12+
13+
?>
14+
--EXPECT--
15+
int(-9223372036854775808)
16+
int(9223372036854775807)
17+
int(8)

0 commit comments

Comments
 (0)