Re: [RFC] Deprecate Invalid Filter Options
| From: | Calvin Buckley | Date: | Sat, 03 Oct 2026 20:22:11 +0000 |
| Subject: | Re: [RFC] Deprecate Invalid Filter Options | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-132779@lists.php.net to get a copy of this message | ||
On Oct 3, 2026, at 2:38 AM, Muhammed Arshid KV <arshidkv12@gmail.com> wrote:
>
> Hi internals,
> I have opened a new RFC proposing improved error handling for invalid integer-valued filter and
> flags options in the Filter extension.
> The proposal introduces a deprecation period in PHP 8.7.
> RFC: https://wiki.php.net/rfc/invalid_filter_options
> Feedback and review are welcome.
> Thanks,
> Muhammed Arshid
Looks reasonable at first glance. My additional suggestions for
follow-on RFCs would be:
- The filter types could be turned into an enum. Would be a pretty
simple RFC.
- Get rid of SAPI-side input filters for the superglobals; they
complicate code that works with them a bit. The INI option that
controls them is already deprecated, so, an RFC to get rid of them
completely?
I do think ext/filter is kind of weird in that the API is very pre-OO
and has a bunch of hardcoded filters and assumptions on how people used
the superglobals, but if we have it, it's still worth cleaning up.