import zend standard tests
[hiphop-php.git] / hphp / test / zend / bad / ext-standard-array / array_udiff_error.php
blob3f4c3c108cc360ee9de93d4d01f7345c38bedab1
1 <?php
2 /* Prototype : array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)
3 * Description: Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function.
4 * Source code: ext/standard/array.c
5 * Alias to functions:
6 */
8 echo "*** Testing array_udiff() : error conditions ***\n";
10 $arr1 = array(1, 2);
11 $arr2 = array(1, 2);
12 include('compare_function.inc');
13 $data_comp_func = 'compare_function';
14 $extra_arg = 10;
17 //Test array_udiff with one more than the expected number of arguments
18 echo "\n-- Testing array_udiff() function with more than expected no. of arguments --\n";
19 var_dump( array_udiff($arr1, $arr2, $data_comp_func, $extra_arg) );
21 // Testing array_udiff with one less than the expected number of arguments
22 echo "\n-- Testing array_udiff() function with less than expected no. of arguments --\n";
23 var_dump( array_udiff($arr1, $arr2) );
26 ===DONE===