|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9102 a possible bug in count_chars
Submitted: 2001-02-04 14:53 UTC Modified: 2001-02-15 08:57 UTC
From: artymiak at safenet dot pl Assigned:
Status: Closed Package: Strings related
PHP Version: 4.0.3pl1 OS: OpenBSD 2.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: artymiak at safenet dot pl
New email:
PHP Version: OS:


 [2001-02-04 14:53 UTC] artymiak at safenet dot pl
The following code stops at 254, whereas the documentation says count_chars ought to generate an array of 256 element.

var_dump($b) shows an array with 255 elements instead of 256.

$a = "a quick brown fox jumps over the lazy dog";
$b = count_chars($a, 0);
$m = 0;
foreach ($b as $n) {
 echo "Code $m was found $n times<br>";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-15 08:57 UTC]
fixed in CVS
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 07:01:30 2024 UTC