1--TEST--
2Test array_intersect_key() function : usage variation - Passing boolean indexed array
3--FILE--
4<?php
5/* Prototype  : array array_intersect_key(array arr1, array arr2 [, array ...])
6 * Description: Returns the entries of arr1 that have keys which are present in all the other arguments.
7 * Source code: ext/standard/array.c
8 */
9
10echo "*** Testing array_intersect_key() : usage variation ***\n";
11
12// Initialise function arguments not being substituted (if any)
13$input_array = array(0 => '0', 1 => '1' , -10 => '-10');
14$boolean_indx_array = array(true => 'boolt', false => 'boolf', TRUE => 'boolT', FALSE => 'boolF');
15
16echo "\n-- Testing array_intersect_key() function with boolean indexed array --\n";
17var_dump( array_intersect_key($input_array, $boolean_indx_array) );
18var_dump( array_intersect_key($boolean_indx_array,$input_array ) );
19?>
20===DONE===
21--EXPECT--
22*** Testing array_intersect_key() : usage variation ***
23
24-- Testing array_intersect_key() function with boolean indexed array --
25array(2) {
26  [0]=>
27  string(1) "0"
28  [1]=>
29  string(1) "1"
30}
31array(2) {
32  [1]=>
33  string(5) "boolT"
34  [0]=>
35  string(5) "boolF"
36}
37===DONE===
38