Table of Contents

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.

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.

Deprecate and drop the following mbregex functions:

Constants:

php.ini options:

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

https://github.com/php/php-src/issues/18467

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

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.