New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flags support for pcre_replace_callback(_array) #3958
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merged as 12bcdd6. |
w00t! |
jrfnl
added a commit
to PHPCompatibility/PHPCompatibility
that referenced
this pull request
Jun 14, 2019
> - PCRE: > The preg_replace_callback() and preg_replace_callback_array() functions now > accept an additional $flags argument, with support for the > PREG_OFFSET_CAPTURE and PREG_UNMATCHED_AS_NULL flags. This influences the > format of the matches array passed to to the callback function. Refs: * https://github.com/php/php-src/blob/42cc58ff7b2fee1c17a00dc77a4873552ffb577f/UPGRADING#L244 * https://bugs.php.net/bug.php?id=77094 * php/php-src#3958 * php/php-src@12bcdd6
jrfnl
added a commit
to jrfnl/doc-en
that referenced
this pull request
May 12, 2020
…rray]() The PHP 7.4 `$flags` parameter as added to the `preg_replace_callback()` and `preg_replace_callback_array()` function was not yet included in the documentation. In this PR, I'm * Adding the parameter to the function signature. * Adding minimal parameter documentation with a reference to the more detailed explanation in the parameter documentation of the [`preg_match()`](https://www.php.net/manual/en/function.preg-match.php) function. * Adding a changelog entry for the parameter to each function. Refs: * php/php-src#3958 * https://github.com/php/php-src/blob/2f1398dad934086b605073c51af3118c8eff28b1/UPGRADING#L304-L308
jrfnl
added a commit
to jrfnl/doc-en
that referenced
this pull request
May 12, 2020
…rray]() The PHP 7.4 `$flags` parameter as added to the `preg_replace_callback()` and `preg_replace_callback_array()` function was not yet included in the documentation. In this PR, I'm * Adding the parameter to the function signature. * Adding minimal parameter documentation with a reference to the more detailed explanation in the parameter documentation of the [`preg_match()`](https://www.php.net/manual/en/function.preg-match.php) function. * Adding a changelog entry for the parameter to each function. Refs: * php/php-src#3958 * https://github.com/php/php-src/blob/2f1398dad934086b605073c51af3118c8eff28b1/UPGRADING#L304-L308
jrfnl
added a commit
to jrfnl/doc-en
that referenced
this pull request
May 12, 2020
…rray]() The PHP 7.4 `$flags` parameter as added to the `preg_replace_callback()` and `preg_replace_callback_array()` function was not yet included in the documentation. In this PR, I'm * Adding the parameter to the function signature. * Adding minimal parameter documentation with a reference to the more detailed explanation in the parameter documentation of the [`preg_match()`](https://www.php.net/manual/en/function.preg-match.php) function. * Adding a changelog entry for the parameter to each function. Refs: * php/php-src#3958 * https://github.com/php/php-src/blob/2f1398dad934086b605073c51af3118c8eff28b1/UPGRADING#L304-L308
php-pulls
pushed a commit
to php/doc-en
that referenced
this pull request
May 23, 2020
…rray]() The PHP 7.4 `$flags` parameter as added to the `preg_replace_callback()` and `preg_replace_callback_array()` function was not yet included in the documentation. In this PR, I'm * Adding the parameter to the function signature. * Adding minimal parameter documentation with a reference to the more detailed explanation in the parameter documentation of the [`preg_match()`](https://www.php.net/manual/en/function.preg-match.php) function. * Adding a changelog entry for the parameter to each function. Refs: * php/php-src#3958 * https://github.com/php/php-src/blob/2f1398dad934086b605073c51af3118c8eff28b1/UPGRADING#L304-L308 Patch contributed by jrfnl. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349965 c90b9560-bf6c-de11-be94-00142212c4b1
salathe
pushed a commit
to salathe/phpdoc-en
that referenced
this pull request
Sep 3, 2020
…rray]() The PHP 7.4 `$flags` parameter as added to the `preg_replace_callback()` and `preg_replace_callback_array()` function was not yet included in the documentation. In this PR, I'm * Adding the parameter to the function signature. * Adding minimal parameter documentation with a reference to the more detailed explanation in the parameter documentation of the [`preg_match()`](https://www.php.net/manual/en/function.preg-match.php) function. * Adding a changelog entry for the parameter to each function. Refs: * php/php-src#3958 * https://github.com/php/php-src/blob/2f1398dad934086b605073c51af3118c8eff28b1/UPGRADING#L304-L308 Patch contributed by jrfnl. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349965 c90b9560-bf6c-de11-be94-00142212c4b1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds support for the
PREG_OFFSET_CAPTURE
andPREG_UNMATCHED_AS_NULL
flags topreg_replace_callback()
andpreg_replace_callback_array()
. They influence how the passed$matches
array looks like.This addresses https://bugs.php.net/bug.php?id=77094.