php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12690 array_unique under windows does not work as it does under linux
Submitted: 2001-08-10 10:31 UTC Modified: 2001-09-14 19:40 UTC
From: colin at nexus dot carleton dot ca Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: colin at nexus dot carleton dot ca
New email:
PHP Version: OS:

 

 [2001-08-10 10:31 UTC] colin at nexus dot carleton dot ca
in linux, the following array would be UNCHANGED after being put through array_unique.  But, in windows you'll see below, the it doesn't seem to go deeper into the value of each array element to check if they are the same or different.

the following are the results from using array_unique on wnidows 2000
BEFORE

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

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

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

    [3] => Array
        (
            [0] => 998
            [1] => 50190
            [2] => 1
        )

)

AFTER ARRAY_UNIQUE

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

)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-14 19:40 UTC] jeroen@php.net
Array_unique isn't supposed to handle multi-dimension arrays, nor objects.

See also 10658
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 03:01:29 2024 UTC