mirror of
https://github.com/php/php-src.git
synced 2025-01-08 20:17:28 +08:00
61 lines
980 B
PHP
61 lines
980 B
PHP
--TEST--
|
|
Test range() function (variation-2)
|
|
--INI--
|
|
precision=14
|
|
--SKIPIF--
|
|
<?php
|
|
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
echo "\n*** Testing max/outof range values ***\n";
|
|
/*var_dump( range("a", "z", 255) );
|
|
var_dump( range("z", "a", 255) ); */
|
|
var_dump( range(2147483645, 2147483646) );
|
|
var_dump( range(2147483646, 2147483648) );
|
|
var_dump( range(-2147483647, -2147483646) );
|
|
var_dump( range(-2147483648, -2147483647) );
|
|
var_dump( range(-2147483649, -2147483647) );
|
|
|
|
echo "\nDone";
|
|
?>
|
|
--EXPECTF--
|
|
*** Testing max/outof range values ***
|
|
array(2) {
|
|
[0]=>
|
|
int(2147483645)
|
|
[1]=>
|
|
int(2147483646)
|
|
}
|
|
array(3) {
|
|
[0]=>
|
|
int(2147483646)
|
|
[1]=>
|
|
int(2147483647)
|
|
[2]=>
|
|
int(2147483648)
|
|
}
|
|
array(2) {
|
|
[0]=>
|
|
int(-2147483647)
|
|
[1]=>
|
|
int(-2147483646)
|
|
}
|
|
array(2) {
|
|
[0]=>
|
|
int(-2147483648)
|
|
[1]=>
|
|
int(-2147483647)
|
|
}
|
|
array(3) {
|
|
[0]=>
|
|
int(-2147483649)
|
|
[1]=>
|
|
int(-2147483648)
|
|
[2]=>
|
|
int(-2147483647)
|
|
}
|
|
|
|
Done
|