Revert "make hphpc able to use ini files"
[hiphop-php.git] / hphp / test / zend / bad / ext / standard / tests / array / array_diff_ukey_error.php
blobf298ab3ce9ba09d0f36ae2b0dbcb9b4864568caa
1 <?php
2 /* Prototype : array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)
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_ukey() : error conditions ***\n";
9 // Initialize
10 $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
11 $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
12 $extra_arg = 10;
14 function key_compare_func($key1, $key2)
16 if ($key1 == $key2) {
17 return 0;
19 return ($key1 > $key2)? 1:-1;
22 //Test array_diff_ukey with one more than the expected number of arguments
23 echo "\n-- Testing array_diff_ukey() function with more than expected no. of arguments --\n";
24 var_dump( array_diff_ukey($array1, $array2, 'key_compare_func', $extra_arg) );
26 // Testing array_diff_ukey with one less than the expected number of arguments
27 echo "\n-- Testing array_diff_ukey() function with less than expected no. of arguments --\n";
28 var_dump( array_diff_ukey($array1, $array2) );
30 // Testing array_diff_ukey with one less than the expected number of arguments
31 echo "\n-- Testing array_diff_ukey() function with no arguments --\n";
32 var_dump( array_diff_ukey() );
34 ===DONE===