====== PHP RFC: grapheme_strrev: strrev for grapheme cluster ====== * Version: 0.9 * Date: 2026-01-14 * Author: Yuya Hamada * Status: Under Discussion * Implementation: https://github.com/php/php-src/pull/20949 ===== Introduction ===== This proposal is strrev for grapheme cluster unit function. Userland sometimes shows [[https://github.com/search?q=mb_strrev&type=code|mb_strrev]] function, but mbstring(Unicode code point unit) can not support multi code point (for example, emoji etc...). Almost same of Swift's [[https://developer.apple.com/documentation/swift/string/reversed()|String.reversed()]]. ===== Proposal ===== Add grapheme_strrev function. ===== Backward Incompatible Changes ===== This could break a function existing in userland with the same name. ===== Proposed PHP Version(s) ===== Next of PHP 8.5 (PHP 8.6 or PHP 9.0) ===== RFC Impact ===== ==== To the Ecosystem ==== None ==== To Existing Extensions ==== Adds grapheme_strrev() to the intl extension. ==== To SAPIs ==== None ===== Open Issues ===== None ===== Future Scope ===== None ===== Voting Choices ===== Pick a title that reflects the concrete choice people will vote on. Please consult [[https://github.com/php/policies/blob/main/feature-proposals.rst#voting-phase|the php/policies repository]] for the current voting guidelines. ---- Primary Vote requiring a 2/3 majority to accept the RFC: * Yes * No * Abstain ===== Patches and Tests ===== * https://github.com/php/php-src/pull/20949 ===== Implementation ===== After the RFC is implemented, this section should contain: - the version(s) it was merged into - a link to the git commit(s) - a link to the PHP manual entry for the feature ===== References ===== * https://news-web.php.net/php.internals/129765 ===== Rejected Features ===== Keep this updated with features that were discussed on the mail lists. ===== Changelog ===== If there are major changes to the initial proposal, please include a short summary with a date or a link to the mailing list announcement here, as not everyone has access to the wikis' version history.