1--TEST-- 2Test array_keys() function (variation - 2) 3--SKIPIF-- 4<?php 5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit 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(6) { 31 [0]=> 32 int(2147483647) 33 [1]=> 34 int(2147483648) 35 [2]=> 36 int(-2147483647) 37 [3]=> 38 int(-2147483648) 39 [4]=> 40 int(-2147483649) 41 [5]=> 42 int(0) 43} 44 45*** Testing array_keys() on an array created on the fly *** 46array(3) { 47 [0]=> 48 string(1) "a" 49 [1]=> 50 string(1) "b" 51 [2]=> 52 string(1) "c" 53} 54array(0) { 55} 56Done 57