Skip to content

[Sync-EN] Version the FILTER_CALLBACK flags note - #1755

Open
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:sync-en/1674
Open

lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:sync-en/1674

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Syncs reference/filter/constants.xml with php/doc-en#5243.

The warning claiming FILTER_CALLBACK cannot be combined with any flag becomes a note describing what actually happens: as of PHP 8.1.25 and 8.2.12 the structural flags FILTER_REQUIRE_ARRAY, FILTER_FORCE_ARRAY and FILTER_REQUIRE_SCALAR do apply, and FILTER_NULL_ON_FAILURE changes how a structural failure is reported; in earlier versions every flag was ignored. Filter specific flags are always ignored, and since the callback's return value is the result, no flag turns a false returned by the callback into &null; or an exception.

The FILTER_VALIDATE_IP description also becomes a simpara, as upstream.

EN-Revision bumped to 1900175b061e4de78f5ba3e79874e457d7e710a1.

Fixes: #1674

@lacatoire
lacatoire requested a review from a team as a code owner August 31, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sync EN] filter: version the FILTER_CALLBACK flags note

1 participant