hiphop-php /hphp/test/zend/good/ext/standard/tests/array/array_unique_variation5.php

Language PHP Lines 20
MD5 Hash 47e38d602750fec275cadc0882b102ee Estimated Cost $82 (why?)
Repository git://github.com/facebook/hiphop-php.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
<?php
/* 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 
 * array having duplicate keys as values.
*/

echo "*** Testing array_unique() : array with duplicate keys for \$input argument ***\n";

// initialize the array having duplicate keys
$input = array( 1 => "one", 2 => "two", 2 => "2", 3 => "three", 1 => "1", "1", "2");
var_dump( array_unique($input) );

echo "Done";
?>
Back to Top