note 115549 deleted from function.mb-strlen by salathe
| From: | salathe@php.net | Date: | Fri, 22 Aug 2014 08:09:57 +0000 |
| Subject: | note 115549 deleted from function.mb-strlen by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-200261@lists.php.net to get a copy of this message | ||
Note Submitter: chiranjivi dot upreti at gmail dot com
----
Further to drake127 note on getting correct length of string in bytes, to ensure best performance,
one can check mbstring.func_overload setting so that mb_strlen() is used only when its required:
$content_length = ini_get('mbstring.func_overload') ? mb_strlen($content ,
'8bit') : strlen($content);