Inspectopedia
 
2024.3

'in_array' can be replaced with comparison

Info
New
Last modified: 03 December 2024

Reports the in_array() calls that are provided with a single-element array as the $haystack argument. Such calls can be replaced with direct comparisons.

See in_array (php.net) for details.