1--TEST--
2Test array_unique() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : array array_unique(array $input)
6 * Description: Removes duplicate values from array
7 * Source code: ext/standard/array.c
8*/
9
10echo "*** Testing array_unique() : basic functionality ***\n";
11
12// array with default keys
13$input = array(1, 2, "1", '2');
14var_dump( array_unique($input) );
15
16// associative array
17$input = array("1" => "one", 1 => "one", 2 => "two", '2' => "two");
18var_dump( array_unique($input) );
19
20// mixed array
21$input = array("1" => "one", "two", "one", 2 => "two", "three");
22var_dump( array_unique($input) );
23
24echo "Done";
25?>
26--EXPECT--
27*** Testing array_unique() : basic functionality ***
28array(2) {
29  [0]=>
30  int(1)
31  [1]=>
32  int(2)
33}
34array(2) {
35  [1]=>
36  string(3) "one"
37  [2]=>
38  string(3) "two"
39}
40array(3) {
41  [1]=>
42  string(3) "one"
43  [2]=>
44  string(3) "two"
45  [4]=>
46  string(5) "three"
47}
48Done
49