1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00

PHP_INT_MIN and _MAX tests

This commit is contained in:
Andrea Faulds
2014-08-01 17:01:17 +01:00
parent a2bbc6f985
commit fe894c2154
2 changed files with 34 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (32-bit)
--SKIPIF--
<?php if (PHP_INT_SIZE !== 4)
die("skip this test is for 32-bit platforms only"); ?>
--FILE--
<?php
var_dump(PHP_INT_MIN);
var_dump(PHP_INT_MAX);
var_dump(PHP_INT_SIZE);
?>
--EXPECT--
int(-2147483648)
int(2147483647)
int(4)
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Test PHP_INT_MIN, PHP_INT_MAX and PHP_INT_SIZE (64-bit)
--SKIPIF--
<?php if (PHP_INT_SIZE !== 8)
die("skip this test is for 64-bit platforms only"); ?>
--FILE--
<?php
var_dump(PHP_INT_MIN);
var_dump(PHP_INT_MAX);
var_dump(PHP_INT_SIZE);
?>
--EXPECT--
int(-9223372036854775808)
int(9223372036854775807)
int(8)