add PREG_UNMATCHED_AS_NULL flag to allow distinguish between unmatched subpatterns and empty matches#2526
add PREG_UNMATCHED_AS_NULL flag to allow distinguish between unmatched subpatterns and empty matches#2526nicolas-grekas wants to merge 1 commit intophp:masterfrom nicolas-grekas:null_nonmatches
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.