PHP: is the implode() function safe for multibyte

2019-04-19 13:04发布

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条回答
孤傲高冷的网名
2楼-- · 2019-04-19 13:29

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 ;)

查看更多
登录 后发表回答