PageRenderTime 50ms CodeModel.GetById 15ms RepoModel.GetById 1ms 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
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  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. * Testing the functionality of array_unique() by passing an array having binary values.
  8. */
  9. <<__EntryPoint>> function main(): void {
  10. echo "*** Testing array_unique() : array with binary data for \$input argument ***\n";
  11. // array with binary values
  12. $input = darray[0 => b"1", 1 => b"hello", 2 => "world", "str1" => "hello", "str2" => "world"];
  13. var_dump( array_unique($input) );
  14. echo "Done";
  15. }