Accepted. Voting closed on February 20, 2026 with 20 in favor, none against and no abstentions, clearing the two-thirds majority it needed. It ships in PHP 8.6.
grapheme_strrev: strrev for grapheme cluster
Adds grapheme_strrev() to intl, which reverses a string by grapheme cluster so emoji and combined characters stay intact.
Add grapheme_strrev function
This poll has closed.
Summary
strrev() reverses a string byte by byte, which breaks any character that takes more than one byte. Some people write their own mb_strrev() that works one code point at a time, but that still breaks emoji built from several code points, like a family emoji. This RFC from Yuya Hamada adds grapheme_strrev() to the intl extension, which reverses a string by grapheme cluster. A grapheme cluster is what you see on screen as a single character, even when it's made of several code points.
Show me
echo grapheme_strrev("ฮฑใใใใใ๐จโ๐จโ๐งโ๐ฆ"); // result is "๐จโ๐จโ๐งโ๐ฆใใใใใฮฑ"
The family emoji stays in one piece and just moves to the front. The RFC says it handles right-to-left languages like Arabic, too.
The author compares it to Swift's String.reversed(), which behaves almost the same way.
What it means for existing code
The only risk is a name clash. If your code already defines its own grapheme_strrev() function, it will conflict with the new one. Nothing else changes.