PageRenderTime 41ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 19ms app.codeStats 0ms

/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
 1<?hh
 2/* Prototype  : array array_unique(array $input)
 3 * Description: Removes duplicate values from array
 4 * Source code: ext/standard/array.c
 5*/
 6
 7/*
 8 * Testing the functionality of array_unique() by passing an array having binary values.
 9*/
10<<__EntryPoint>> function main(): void {
11echo "*** Testing array_unique() : array with binary data for \$input argument ***\n";
12
13// array with binary values
14$input = darray[0 => b"1", 1 => b"hello", 2 => "world", "str1" => "hello", "str2" => "world"];
15
16var_dump( array_unique($input) );
17
18echo "Done";
19}