1--TEST--
2Test array_keys() function (variation - 2)
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
6?>
7--FILE--
8<?php
9
10echo "\n*** Testing array_keys() on range of values ***\n";
11$arr_range = array(
12  2147483647 => 1,
13  2147483648 => 2,
14  -2147483647 => 3,
15  -2147483648 => 4,
16  -2147483649 => 5,
17  -0 => 6,
18  0 => 7
19);
20var_dump(array_keys($arr_range));
21
22echo "\n*** Testing array_keys() on an array created on the fly ***\n";
23var_dump(array_keys(array("a" => 1, "b" => 2, "c" => 3)));
24var_dump(array_keys(array()));  // null array
25
26echo "Done\n";
27?>
28--EXPECT--
29*** Testing array_keys() on range of values ***
30array(4) {
31  [0]=>
32  int(2147483647)
33  [1]=>
34  int(-2147483648)
35  [2]=>
36  int(-2147483647)
37  [3]=>
38  int(0)
39}
40
41*** Testing array_keys() on an array created on the fly ***
42array(3) {
43  [0]=>
44  string(1) "a"
45  [1]=>
46  string(1) "b"
47  [2]=>
48  string(1) "c"
49}
50array(0) {
51}
52Done
53