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