php-src/ext/standard/tests/array/array_keys_variation_002_64bit.phpt
Steph Fox 833f4150a1 - killed off UEXPECT
- could someone please fix var_export2.phpt? NUL is corrupted, can't fix here
2008-05-26 23:36:10 +00:00

57 lines
983 B
PHP

--TEST--
Test array_keys() function (variation - 2)
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
echo "\n*** Testing array_keys() on range of values ***\n";
$arr_range = array(
2147483647 => 1,
2147483648 => 2,
-2147483647 => 3,
-2147483648 => 4,
-2147483649 => 5,
-0 => 6,
0 => 7
);
var_dump(array_keys($arr_range));
echo "\n*** Testing array_keys() on an array created on the fly ***\n";
var_dump(array_keys(array("a" => 1, "b" => 2, "c" => 3)));
var_dump(array_keys(array())); // null array
echo "Done\n";
?>
--EXPECT--
*** Testing array_keys() on range of values ***
array(6) {
[0]=>
int(2147483647)
[1]=>
int(2147483648)
[2]=>
int(-2147483647)
[3]=>
int(-2147483648)
[4]=>
int(-2147483649)
[5]=>
int(0)
}
*** Testing array_keys() on an array created on the fly ***
array(3) {
[0]=>
unicode(1) "a"
[1]=>
unicode(1) "b"
[2]=>
unicode(1) "c"
}
array(0) {
}
Done