2024年3月27日(水) 6:18 Casper Langemeijer <langemei...@php.net>: > > On Tue, Mar 26, 2024, at 18:15, Derick Rethans wrote: > > Many of these already exist, such as grapheme_substr. We can't simply change > the behaviour of the already existing functions due to BC reasons. > > > Wow. I feel very stupid. I feel I should have known about grapheme_*, but I > didn't. Oh my, the manual says since PHP 5.3 no less. From what I've seen > around being used, I'm far from the only one though. In an attempt to justify > my own stupidity I searched its use and it's bad. > > Searching on github with language:PHP: > `mb_strlen` 84k files, `grapheme_strlen` 680 > > Then a big number of first 100 of these files are stubs/polyfills/phpstan > metadata. I've seen no framework except Symphony (but they might be further > in the searchresults) > > The grapheme_str_split function, as well as other intl extension functions is > what should replace mbstring really. > > > YES! > > I'm sorry to have wasted your time. If you need someone to help for the > grapheme_ marketing team, let me know.
Hi, Casper I think still useful mbstring functions. Because mbstring functions is still valid as a bridge to non-Unicode character codes. We think it makes sense for mbstring to calculate in Unicode code point units. Therefore, I think make sense that separate mbstring functions and grapheme functions. Regards Yuya -- --------------------------- Yuya Hamada (tekimen) - https://tekitoh-memdhoi.info - https://github.com/youkidearitai -----------------------------