mb_* functions vs normal functions

why using mb_* functions vs normal functions? e.g. mb_strpos rather than using just strops function? why mb_strlen vs strlen? why mb_strtolower vs strtolower? why using mbstring extension at all?

http://php.net/manual/en/intro.mbstring.php

So in short when you handle multibyte encoded strings you must use mb_ functions to prevent data corruption.

The mb_* functions are designed for dealing with multibyte (eg UTF-8) strings without potentially corrupting them. Checkout the introduction to the multibyte extension in the PHP manual for more info, and also the ‘Working with UTF-8’ section of phptherightway.com for a bit more background.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.