/hphp/test/zend/good/ext/standard/tests/array/array_unique_variation7.php
http://github.com/facebook/hiphop-php · PHP · 19 lines · 7 code · 4 blank · 8 comment · 1 complexity · 3b0ea415a4e9f99a45fb5cbb05b9cc99 MD5 · raw file
- <?hh
- /* Prototype : array array_unique(array $input)
- * Description: Removes duplicate values from array
- * Source code: ext/standard/array.c
- */
- /*
- * Testing the functionality of array_unique() by passing an array having binary values.
- */
- <<__EntryPoint>> function main(): void {
- echo "*** Testing array_unique() : array with binary data for \$input argument ***\n";
- // array with binary values
- $input = darray[0 => b"1", 1 => b"hello", 2 => "world", "str1" => "hello", "str2" => "world"];
- var_dump( array_unique($input) );
- echo "Done";
- }