1--TEST--
2Test 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
14echo "*** 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
19var_dump( array_unique($input) );
20
21echo "Done";
22?>
23--EXPECTF--
24*** Testing array_unique() : array with binary data for $input argument ***
25array(3) {
26  [0]=>
27  string(1) "1"
28  [1]=>
29  string(5) "hello"
30  [2]=>
31  string(5) "world"
32}
33Done
34