Fix preg_filter function signature #826
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
preg_filter
has had the same function signature aspreg_replace
since it was first introduced in PHP 5.3, but this has not been updated in functionMap.php.This causes a failure on PHP <8.0 as per: https://phpstan.org/r/20453e88-edfc-4e1b-8e1f-728a9a1c7c60
Function signatures
preg_filter: https://github.com/php/php-src/blob/7311087cf06bf9f3d6b5863d9b54272f3d163ba9/ext/pcre/php_pcre.c#L1418-L1419
preg_replace: https://github.com/php/php-src/blob/7311087cf06bf9f3d6b5863d9b54272f3d163ba9/ext/pcre/php_pcre.c#L1402-L1403