1--TEST-- 2Test array_values() function 3--SKIPIF-- 4<?php 5if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); 6?> 7--INI-- 8precision=14 9--FILE-- 10<?php 11 12echo "\n*** Testing array_values() with resource type ***\n"; 13$resource1 = fopen(__FILE__, "r"); // Creating a file resource 14$resource2 = opendir("."); // Creating a dir resource 15 16/* creating an array with resources as elements */ 17$arr_resource = array( "a" => $resource1, "b" => $resource2); 18var_dump( array_values($arr_resource) ); 19 20echo "\n*** Testing array_values() with range checking ***\n"; 21$arr_range = array( 22 2147483647, 23 2147483648, 24 -2147483647, 25 -2147483648, 26 -0, 27 0, 28 -2147483649 29); 30var_dump( array_values($arr_range) ); 31 32echo "\n*** Testing array_values() on an array created on the fly ***\n"; 33var_dump( array_values(array(1,2,3)) ); 34var_dump( array_values(array()) ); // null array 35 36?> 37--EXPECTF-- 38*** Testing array_values() with resource type *** 39array(2) { 40 [0]=> 41 resource(%d) of type (stream) 42 [1]=> 43 resource(%d) of type (stream) 44} 45 46*** Testing array_values() with range checking *** 47array(7) { 48 [0]=> 49 int(2147483647) 50 [1]=> 51 int(2147483648) 52 [2]=> 53 int(-2147483647) 54 [3]=> 55 int(-2147483648) 56 [4]=> 57 int(0) 58 [5]=> 59 int(0) 60 [6]=> 61 int(-2147483649) 62} 63 64*** Testing array_values() on an array created on the fly *** 65array(3) { 66 [0]=> 67 int(1) 68 [1]=> 69 int(2) 70 [2]=> 71 int(3) 72} 73array(0) { 74} 75