Annotation of embedaddon/php/ext/standard/tests/array/array_unique_variation7.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test array_unique() function : usage variations - binary safe checking
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:
10: /*
11: * Testing the functionality of array_unique() by passing an array having binary values.
12: */
13:
14: echo "*** Testing array_unique() : array with binary data for \$input argument ***\n";
15:
16: // array with binary values
17: $input = array( b"1", b"hello", "world", "str1" => "hello", "str2" => "world");
18:
19: var_dump( array_unique($input) );
20:
21: echo "Done";
22: ?>
23: --EXPECTF--
24: *** Testing array_unique() : array with binary data for $input argument ***
25: array(3) {
26: [0]=>
27: string(1) "1"
28: [1]=>
29: string(5) "hello"
30: [2]=>
31: string(5) "world"
32: }
33: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>