Regarding the validity of a UTF-8 string when using the /u pattern modifier, some things to be aware of; 1. If the pattern itself contains an invalid UTF-8 character, you get an error (as mentioned in the docs above - "UTF-8 validity of the pattern is checked since PHP 4.3.5" 2. When the subject string contains invalid UTF-8 sequences / codepoints, it basically result in a "quiet death" for the pr
![PHP: 正規表現パターンに使用可能な修飾子 - Manual](https://cdn-ak-scissors.b.st-hatena.com/image/square/4dd02c2555ca1b32548779e23dc3e33a9f46bf13/height=288;version=1;width=512/https%3A%2F%2Fwww.php.net%2Fimages%2Fmeta-image.png)