mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
For legacy text encodings where mb_strcut is implemented using an mblen_table (such as the various SJIS variants), mb_strcut is now ~30% faster on small strings (about 10 bytes). This is because we are now avoiding an extra, unnecessary copy operation on the output string. When used on large strings, the difference in performance is negligible, as almost the entire runtime is spent stepping through the string to find the starting and ending cut points.