1--TEST-- 2Test array_keys() function (variation - 5) 3--FILE-- 4<?php 5 6echo "\n*** Testing array_keys() with resource type ***\n"; 7$resource1 = fopen( __FILE__, "r"); 8$resource2 = opendir( "." ); 9 10/* creating an array with resource types as elements */ 11$arr_resource = array($resource1, $resource2); 12 13var_dump(array_keys($arr_resource, $resource1)); // loose type checking 14var_dump(array_keys($arr_resource, $resource1, TRUE)); // strict type checking 15var_dump(array_keys($arr_resource, $resource2)); // loose type checking 16var_dump(array_keys($arr_resource, $resource2, TRUE)); // strict type checking 17 18/* Closing the resource handles */ 19fclose( $resource1 ); 20closedir( $resource2 ); 21 22?> 23--EXPECTF-- 24*** Testing array_keys() with resource type *** 25array(1) { 26 [0]=> 27 int(0) 28} 29array(1) { 30 [0]=> 31 int(0) 32} 33array(1) { 34 [0]=> 35 int(1) 36} 37array(1) { 38 [0]=> 39 int(1) 40} 41