"Adam Kazimierczak" <kazym...@gmail.com> сообщил/сообщила в новостях следующее: news:51ba2cc5.3060...@gmail.com...
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.

Cheers,
Adam


Hi Adam

I found that strlen is often considered as a function that counts
characters in strings, rather than bytes.

Don't forget about zend.multibyte feature...

If it is on and you have a script in 'utf-8 with BOM' encoding
php will detect it and strlen will take this into account.


Cheers,
Andy

Reply via email to