Skip to content

Conversation

@nzsys
Copy link
Contributor

@nzsys nzsys commented Feb 14, 2025

What this PR does

This PR removes unused code and simplifies regex patterns in mail_util.inc, which is part of the standard tests for the ext/standard extension. These changes enhance code readability, maintainability, and remove redundant operations without affecting functionality.

Details of the changes

  1. Removed the unused $items variable from the getHeaders function.
  2. Removed unnecessary lazy quantifiers (?) in regex patterns.
  3. Removed the unused s flag in regex patterns, as it serves no purpose here.

- Removed unused variable  from getHeaders function.
- Simplified regex by removing unnecessary lazy quantifiers ().
- Removed unnecessary  flag from regex patterns.
This improves readability and reduces redundant code without altering functionality.
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@iluuu1994 iluuu1994 merged commit 2d693c4 into php:master Feb 14, 2025
9 checks passed
@iluuu1994
Copy link
Member

Thank you @nzsys!

@nzsys nzsys deleted the fix/cleanup-deadcode-regex-flags branch February 14, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants