# sixth mode for count_chars

- Thread: https://externals.io/message/2338
- Original archive: https://news-web.php.net/php.internals/2338
- Started by Joey Smith on 2003-06-14T23:17:49+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #2338 — Joey Smith — 2003-06-14T23:17:49+00:00

URL: https://externals.io/message/2338#2338

The two attached files add a sixth mode to count chars, one that
comes up now and again.

This is the same as mode 1, but the resulting array has the actual
char as the array index instead of the byte-value. This can be used
in place of preg_split('//', $string) and such.

I've also prepared patches for the documentation and for 4.3.2 to go
along with this.

You can also find the patches online:
http://www.joeysmith.com/CVS_HEAD.patch
http://www.joeysmith.com/PHP_4_3_2.patch
http://www.joeysmith.com/phpdoc.patch
