1--TEST--
2Test array_uintersect_assoc() function : error conditions
3--FILE--
4<?php
5/* Prototype  : array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)
6 * Description: U
7 * Source code: ext/standard/array.c
8 * Alias to functions:
9 */
10
11echo "*** Testing array_uintersect_assoc() : error conditions ***\n";
12
13//Test array_uintersect_assoc with one more than the expected number of arguments
14echo "\n-- Testing array_uintersect_assoc() function with more than expected no. of arguments --\n";
15$arr1 = array(1, 2);
16$arr2 = array(1, 2);
17include('compare_function.inc');
18$data_compare_function = 'compare_function';
19
20$extra_arg = 10;
21var_dump( array_uintersect_assoc($arr1, $arr2, $data_compare_function, $extra_arg) );
22
23// Testing array_uintersect_assoc with one less than the expected number of arguments
24echo "\n-- Testing array_uintersect_assoc() function with less than expected no. of arguments --\n";
25$arr1 = array(1, 2);
26$arr2 = array(1, 2);
27var_dump( array_uintersect_assoc($arr1, $arr2) );
28
29?>
30===DONE===
31--EXPECTF--
32*** Testing array_uintersect_assoc() : error conditions ***
33
34-- Testing array_uintersect_assoc() function with more than expected no. of arguments --
35
36Warning: array_uintersect_assoc() expects parameter 4 to be a valid callback, no array or string given in %sarray_uintersect_assoc_error.php on line %d
37NULL
38
39-- Testing array_uintersect_assoc() function with less than expected no. of arguments --
40
41Warning: array_uintersect_assoc(): at least 3 parameters are required, 2 given in %sarray_uintersect_assoc_error.php on line %d
42NULL
43===DONE===
44