Inspectopedia
 
2024.3

'preg_match()' can be replaced with comparison

Info
New
Last modified: 03 December 2024

Reports the preg_match() calls that are provided with a string argument starting with ^ (Start of String anchor) and ending with $ (End of String anchor). Such calls can be replaced with a comparison operation.