On Sat, Jun 22, 2019 at 6:32 PM Nikita Popov <nikita....@gmail.com> wrote: > > The normal str_starts_with() function is perfectly safe to use on UTF-8 > strings,
Only if you assume strings to be normalized to the same form. Checking if NFC string starts with NFD substring by checking them bit by bit is going to yield false negatives [1] [1] https://3v4l.org/4HgUL -- Best regards, Bruce Weirdan mailto:weir...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php