import zend standard tests
[hiphop-php.git] / hphp / test / zend / good / ext-standard-array / array_diff_key_variation6.php
blobbdbd44b5e75f2ba0a31f2d0397a8bff72433c1c7
1 <?php
2 /* Prototype : array array_diff_key(array arr1, array arr2 [, array ...])
3 * Description: Returns the entries of arr1 that have keys which are not present in any of the others arguments.
4 * Source code: ext/standard/array.c
5 */
7 echo "*** Testing array_diff_key() : usage variation ***\n";
9 // Initialise function arguments not being substituted (if any)
10 $input_array = array(0 => '0', 1 => '1', -10 => '-10', 'true' => 1, 'false' => 0);
11 $boolean_indx_array = array(true => 'boolt', false => 'boolf', TRUE => 'boolT', FALSE => 'boolF');
13 echo "\n-- Testing array_diff_key() function with boolean indexed array --\n";
14 // loop through each element of the array for arr1
15 var_dump( array_diff_key($input_array, $boolean_indx_array) );
16 var_dump( array_diff_key($boolean_indx_array, $input_array) );
18 ===DONE===