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 PREG_UNMATCHED_AS_NULL flag to allow distinguish between unmatched subpatterns and empty matches #2526
Conversation
👍 But the name sounds strange - I originally suggested something like |
Agree with @Majkl578 on name, and I like I see you've updated (essentially reverted from prior commit) the tests dealing with unmatched subpatterns, but would you mind adding a test which uses the constant? |
I second |
…d subpatterns and empty matches
Updated |
Oh, weird, dunno how I missed the tests before. Anyway, thumbs up from me. |
Could this be merged please? That'd help us try 7.2 as it removes the BC break. Then if the new part needs improvement, it'll be open to another PR. |
LGTM, will merge it asap |
Comment on behalf of remi at php.net: Merged, thanks |
ping @cmb69 FYI since you wanted to have another behavior when the flag (another one) is passed. |
@nicolas-grekas Thanks for the ping. Since others like this PR, it's okay for me to have this behavior. :) |
Makes #1303 opt-in, fixing the BC break it introduced.