2 /* Prototype : array array_diff_assoc(array $arr1, array $arr2 [, array ...])
3 * Description: Returns the entries of arr1 that have values which are not present
4 * in any of the others arguments but do additional checks whether the keys are equal
5 * Source code: ext/standard/array.c
9 * Test errors for array_diff with too few\zero arguments
11 <<__EntryPoint
>> function main(): void
{
12 echo "*** Testing array_diff_assoc() : error conditions ***\n";
15 echo "\n-- Testing array_diff_assoc() function with zero arguments --\n";
16 try { var_dump( array_diff_assoc() ); } catch (Exception
$e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__
.' on line '.__LINE__
."\n"; }
18 // Testing array_diff_assoc with one less than the expected number of arguments
19 echo "\n-- Testing array_diff_assoc() function with less than expected no. of arguments --\n";
21 try { var_dump( array_diff_assoc($arr1) ); } catch (Exception
$e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__
.' on line '.__LINE__
."\n"; }