PHP: is the implode() function safe for multibyte strings?

南笙酒味 提交于 2019-12-06 18:26:19

问题


The explode() function has a correlating multibyte-safe function in mb_split().

I don't see a correlating function for implode(). Does this imply that implode is already safe for multibyte strings?


回答1:


As long as your delimiter and the strings in the array contain only well-formed multibyte sequences there should not be any issues.

implode basically is a fancy concatenation operator and I couldn't imagine a scenario where concatenation is not multibyte safe ;)



来源:https://stackoverflow.com/questions/8564967/php-is-the-implode-function-safe-for-multibyte-strings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!