PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: 'preg_match()' can be replaced with comparison

Last modified: 16 May 2022

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.