stripos returns false when special characters is used
问题 I am using the stripos function to check if a string is located inside another string, ignoring any cases. Here is the problem: stripos("ø", "Ø") returns false. While stripos("Ø", "Ø") returns true. As you might see, it looks like the function does NOT do a case- insensitive search in this case. The function has the same problems with characters like Ææ and Åå. These are Danish characters. 回答1: Use mb_stripos() instead. It's character set aware and will handle multi-byte character sets.