Muhammed Arshid opened the vote on October 20, 2026, after the internals discussion. Voters answer one question: should the Filter\Filter and Filter\Flag enums be added in PHP 8.7? Voting closed on November 4, 2026 at 00:00 UTC with 2 votes in favor, 16 against and 2 abstentions. It needed a two-thirds majority, so the RFC is declined.
Filter Enums: Typed IDs and Flags for filter_*()
On the PHP wiki as Add Filter\Filter and Filter\Flag Enums
Adds Filter\Filter and Filter\Flag backed enums for typed filter IDs and flags while keeping existing integer constants and arguments working.
Implement Filter\Filter and Filter\Flag enums as outlined in the RFC?
This poll has closed.
Summary
The Filter\Filter and Filter\Flag RFC adds backed enums for the Filter extension's integer options. You can use named cases instead of memorising constants, while existing code keeps working.
Named filter options
Filter\Filter covers filter IDs such as VALIDATE_INT and VALIDATE_EMAIL. Filter\Flag covers flags such as ALLOW_HEX and ALLOW_THOUSAND. Both enums use integer backing values, matching the extension's current API.
filter_var('123', Filter\Filter::VALIDATE_INT); filter_var( '123', Filter\Filter::VALIDATE_INT, Filter\Flag::ALLOW_OCTAL, );
The same enums can appear in filter definitions passed to filter_var_array() and filter_input_array(). When you need several flags, combine their backing values.
filter_var( '123', Filter\Filter::VALIDATE_INT, Filter\Flag::ALLOW_OCTAL->value | Filter\Flag::ALLOW_HEX->value, );
The implementation pull request adds support for the enums across filter_var(), filter_var_array(), filter_input(), and filter_input_array(). The RFC does not remove the existing constants or integer arguments, so current applications do not need to change.