Re: strlen and multi-byte characters
| From: | Sherif Ramadan | Date: | Sun, 16 Jun 2013 08:41:41 +0000 |
| Subject: | Re: strlen and multi-byte characters | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969384414@lists.php.net to get a copy of this message | ||
On Thu, Jun 13, 2013 at 4:34 PM, Adam Kazimierczak <kazymjir@gmail.com>wrote:
> Hello Mailing List,
>
> I found that strlen is often considered as a function that counts
> characters in strings, rather than bytes. Such mistake is even often seen
> on blogs or tutorials, so many PHP beginners may get confused when they try
> to strlen a multi-byte characters string.
>
> I am attaching a patch proposition where the description notes that length
> is measured in bytes and adds an example showing results of strlen used on
> multi-byte character strings.
>
> Please let me know what do you think about this.
>
+1 from me.
>
> Cheers,
> Adam
>