PHP 4.0 Bug #9102 Updated: a possible bug in count_chars
| From: | thies@php.net | Date: | Thu, 15 Feb 2001 13:57:37 +0000 |
| Subject: | PHP 4.0 Bug #9102 Updated: a possible bug in count_chars | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46657@lists.php.net to get a copy of this message | ||
ID: 9102
Updated by: thies
Reported By: artymiak@safenet.pl
Old-Status: Open
Status: Closed
Bug Type: Strings related
Assigned To:
Comments:
fixed in CVS
Previous Comments:
---------------------------------------------------------------------------
[2001-02-04 14:53:10] artymiak@safenet.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>";
$m++;
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9102&edit=2