2 /* Prototype : array array_unique(array $input)
3 * Description: Removes duplicate values from array
4 * Source code: ext/standard/array.c
6 <<__EntryPoint
>> function main(): void
{
7 echo "*** Testing array_unique() : error conditions ***\n";
10 echo "\n-- Testing array_unique() function with zero arguments --\n";
11 try { var_dump( array_unique() ); } catch (Exception
$e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__
.' on line '.__LINE__
."\n"; }
13 //Test array_unique with one more than the expected number of arguments
14 echo "\n-- Testing array_unique() function with more than expected no. of arguments --\n";
17 try { var_dump( array_unique($input, SORT_NUMERIC
, $extra_arg) ); } catch (Exception
$e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__
.' on line '.__LINE__
."\n"; }