Skip to content

Clarify PREG_UNMATCHED_AS_NULL behavior for trailing groups#5272

Open
lacatoire wants to merge 1 commit intophp:masterfrom
lacatoire:fix/preg-unmatched-as-null-description
Open

Clarify PREG_UNMATCHED_AS_NULL behavior for trailing groups#5272
lacatoire wants to merge 1 commit intophp:masterfrom
lacatoire:fix/preg-unmatched-as-null-description

Conversation

@lacatoire
Copy link
Contributor

Summary

  • Clarify PREG_UNMATCHED_AS_NULL behavior: trailing unmatched subpatterns are omitted
    without the flag, but included as null with it
  • Update description in preg_match(), preg_match_all(), and the constants page
  • Add a trailing optional groups example to preg_match() showing the difference

Fixes #3483

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.

PREG_UNMATCHED_AS_NULL description

1 participant