#5742 - Consider in_array when there are 3 or more string comparisons

  • By
  • Added
  • 5 views
Identifier #5742
Issue type Feature request or suggestion
Title Consider in_array when there are 3 or more string comparisons
Status Open
Tags

Roadmap: Over the horizon (custom)

Type: Performance (custom)

Handling member Deleted
Addon core
Description in_array is more readable and possibly faster if comparing 3 or more strings with the same condition in an if guard.

It can also be used for strict comparison of multiple strings (with in_array parameter 3 being set to true).

Consider adding this to coding standards / code linter.
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated