In reference/array/functions/array-unique.xml file there's an example:

$input = array (4,"4","3",4,3,"3");
$result = array_unique ($input);
var_dump($result);

The printout of the program above will be (PHP 4.0.6):

array(2) {
  [3]=>
  int(4)
  [4]=>
  int(3)
}

But in my Linux system, both PHP 4.0.6 and PHP 4.3.0-dev print the following
result:

array(2) {
  [0]=>
  int(4)
  [2]=>
  string(1) "3"
}

And in PHP 4.2.3-dev under Windows it print out:

array(2) {
  [1]=>
  string(1) "4"
  [5]=>
  string(1) "3"
}

This really confused me.  What's going on here?  Thanks in advance.




-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to