note 77040 added to function.mb-strlen
| From: | drake127 at osu1 dot php dot net | Date: | Sun, 12 Aug 2007 15:36:54 +0000 |
| Subject: | note 77040 added to function.mb-strlen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129423@lists.php.net to get a copy of this message | ||
Speed of mb_strlen varies a lot according to specified character set.
If you need length of string in bytes (strlen cannot be trusted anymore because of
mbstring.func_overload) you should use <?php mb_strlen($string, '8bit'); ?>.
It's the fastest way (still a way slower than strlen, though) to determine byte length of
string. Other single byte character sets (ASCII, ISO-8859-1, ...) are several times slower than
8bit.
----
Server IP: 69.147.83.197
Probable Submitter: 89.185.230.75
----
Manual Page -- http://www.php.net/manual/en/function.mb-strlen.php
Edit -- https://master.php.net/note/edit/77040
Del: integrated -- https://master.php.net/note/delete/77040/integrated
Del: useless -- https://master.php.net/note/delete/77040/useless
Del: bad code -- https://master.php.net/note/delete/77040/bad+code
Del: spam -- https://master.php.net/note/delete/77040/spam
Del: non-english -- https://master.php.net/note/delete/77040/non-english
Del: in docs -- https://master.php.net/note/delete/77040/in+docs
Del: other reasons-- https://master.php.net/note/delete/77040
Reject -- https://master.php.net/note/reject/77040
Search -- https://master.php.net/manage/user-notes.php