Phalanger /4.0/Testing/Tests/Arrays/array_unique.php

Language PHP Lines 21
MD5 Hash c8d1a26e8316854076199a4eba333a9b Estimated Cost $215 (why?)
Repository https://Phalanger.svn.codeplex.com/svn View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
[expect php]
[file]
<?
  
  function test(&$a)
  {
    $arr = array( 4,3,4,3,2,1,2,1,4,3,2,1 );
    $arr[] = &$a;
    $arr[] = $a;
    var_dump($arr);

    // check whether values are preserved in the same order
    // without duplicities
    // preserving the first unique entry
    var_dump(array_unique($arr));
  }

  $x = 5;
  test($x);

?>
Back to Top