From:             [EMAIL PROTECTED]
Operating system: linux
PHP version:      4.1.2
PHP Bug Type:     Arrays related
Bug description:  array_unique results in only one entry in the array

The following code should demonstrate that unusual behavior (becaue I'm
still not convinced that this is a bug)

$input = array ( array (1,1), array (1,2), array(1,2), array(1,1) );
$result = array_unique ($input);
print_r($result);

The result is :
Array
(
    [0] => Array
        (
            [0] => 1
            [1] => 1
        )
)

This was not what I was expecting. I was expecting the following result :
Array
(
    [0] => Array
        (
            [0] => 1
            [1] => 1
        )

    [1] => Array
        (
            [0] => 1
            [1] => 2
        )

)

This is the result You get if You use PHP Version 4.0.4pl1 and before for
example.
So it is up to You, if You call this a bug or if I just have missused the
function array_unique because I was not using a one dimensional array.
Hopefully that helps You and me.

Cheers
Thomas
-- 
Edit bug report at http://bugs.php.net/?id=16715&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16715&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16715&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16715&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16715&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16715&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16715&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16715&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16715&r=submittedtwice

Reply via email to