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
Status: Closed Package: Arrays related
PHP Version: 5CVS-2005-10-04 (CVS) OS: *
Private report: No CVE-ID:
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 14:02:33 2014 UTC