PhpStorm 2019.2 Help

Code Inspection: Duplicate branch in alternation

Reports duplicate branches in a RegExp alternation. For example (a|b|a).Duplicate branches slow down matching and obscure the intent of the expression.

New in 2017.1

Last modified: 23 August 2019