Ayesh Karunaratne a3d93473cc [PHP 8.4][Intl] Add grapheme_str_split
Add a polyfill for the `grapheme_str_split` function added in PHP 8.4.

Requires PHP 7.3, because the polyfill is based on `\X` Regex, and it
only works properly on PCRE2, which
[only comes with PHP 7.3+](https://php.watch/versions/7.3/pcre2).

Further, there are some cases that the polyfill cannot split complex
characters (such as two consecutive country flag Emojis). This is now
fixed in [PCRE2Project/pcre2#410](https://github.com/PCRE2Project/pcre2/issues/410).
However, this change will likely only make it to PHP 8.4.

References:
 - [RFC: Grapheme cluster for `str_split` function: `grapheme_str_split`](https://wiki.php.net/rfc/grapheme_str_split)
 - [PHP.Watch: PHP 8.4: New `grapheme_str_split` function](https://php.watch/versions/8.4/grapheme_str_split)
2025-06-24 09:44:37 +02:00
2018-09-21 08:26:08 +02:00
2015-10-25 02:12:06 +02:00
2023-01-26 09:33:37 +01:00
2024-01-09 20:22:30 +01:00
2020-12-26 11:50:31 +01:00
2024-09-10 16:38:51 +02:00
2024-09-10 16:38:51 +02:00

Symfony Polyfill / Util

More information can be found in the main Polyfill README.

License

This library is released under the MIT license.

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:38:15.052Z
Readme MIT 112 KiB
Languages
PHP 100%