php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47994 array_unique, removing non uniques
Submitted: 2009-04-16 20:53 UTC Modified: 2009-04-30 08:24 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: bstrick at gmail dot com Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.2.8 OS: Windows
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bstrick at gmail dot com
New email:
PHP Version: OS:

 

 [2009-04-16 20:53 UTC] bstrick at gmail dot com
Description:
------------
Numbers are considered the same if the first 15 or more digits are the same.

Reproduce code:
---------------
<?

$test = array(3164843838577683662, 3164843838577682136);

echo count($test);

$test = array_unique($test);

echo count($test);

?>


Expected result:
----------------
22

Actual result:
--------------
21

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-17 11:09 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

I can not reproduce this with 32bit linux..
 [2009-04-17 19:18 UTC] bstrick at gmail dot com
The bug was for version 5.2.8  I tested this in 5.2.9 and it has been resolved.  Sorry.
 [2009-04-30 08:24 UTC] jani@php.net
See above. :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Sep 25 09:00:02 2025 UTC