rfc:eol-oniguruma

PHP RFC: Oniguruma maintenance end and future of mbregex

Introduction

Oniguruma maintenance ended on 2025-04-24. PHP uses mbregex (mb_ereg...) functions. We need to decide the future of this group of functions.

Proposal

It is likely that the following points need to be decided, and how we will maintain versions 8.2 - 8.5.

  • Maintenance versions: 8.2. 8.3, 8.4, 8.5
  • Deprecate version: 8.6 (next after 8.5)
  • Drop support: 9.0

PHP 8.1 is not included because it is EOL in FreeBSD on 2026-12-01.

Maintenance versions can use mbregex functions. However, FreeBSD will drop support on 2026-12-01 (ref: https://github.com/php/php-src/issues/18467#issuecomment-3044192511). We should decide what we will do after EOL in FreeBSD.

  • Re-include Oniguruma (can we fix security issues and maintain?)
  • Drop support in maintenance versions on 2026-12-01 (can we change this?)

Deprecate and drop the following mbregex functions:

  • mb_ereg
  • mb_ereg_match
  • mb_ereg_replace
  • mb_ereg_replace_callback
  • mb_ereg_search
  • mb_ereg_search_getpos
  • mb_ereg_search_getregs
  • mb_ereg_search_init
  • mb_ereg_search_pos
  • mb_ereg_search_regs
  • mb_ereg_search_setpos
  • mb_eregi
  • mb_eregi_replace
  • mb_regex_encoding
  • mb_regex_set_options
  • mb_split

Constants:

  • MB_ONIGURUMA_VERSION

php.ini options:

  • mbstring.regex_retry_limit
  • mbstring.regex_stack_limit

Backward Incompatible Changes

The mbregex functions cannot be used.

Proposed PHP Version(s)

Deprecate for 8.6 and remove in 9.0, but what do we do in maintenance versions?

RFC Impact

To Existing Extensions

Mbregex

To SAPIs

Describe the impact to CLI, Development web server, embedded PHP etc.

Open Issues

Future Scope

This section should outline areas that you are not planning to work on in the scope of this RFC, but that might be iterated upon in the future by yourself or another contributor.

This helps with long-term planning and ensuring this RFC does not prevent future work.

Voting Choices

  • We decide deprecate and drop support for mbregex functions
  • How do we handle maintenance versions?

Implementation

References

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.

rfc/eol-oniguruma.txt · Last modified: by theodorejb