php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34723 array_count_values() strips leading zeroes
Submitted: 2005-10-04 03:19 UTC Modified: 2005-10-04 22:50 UTC
From: gimmelol at netcourrier dot com Assigned: tony2001 (profile)
Status: Closed Package: Arrays related
PHP Version: 5CVS-2005-10-04 (CVS) OS: *
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: gimmelol at netcourrier dot com
New email:
PHP Version: OS:

 

 [2005-10-04 03:19 UTC] gimmelol at netcourrier dot com
Description:
------------
This bug has already been reported and marked bogus here: http://bugs.php.net/bug.php?id=33279
but it is still reproducible in 5.1RC1 and recent snapshots

Reproduce code:
---------------
<?php
var_dump(array_count_values(array("012345")));
?>

Expected result:
----------------
array(1) {
  ["012345"]=>
  int(1)
}

Actual result:
--------------
array(1) {
  [12345]=>
  int(1)
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-04 10:41 UTC] sniper@php.net
Still broken.
 [2005-10-04 22:50 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Apr 02 21:01:29 2025 UTC