Inspectopedia
 
2024.3

Loop can be replaced with 'in_array()' or 'array_key_exists()' call

Info
New
Last modified: 03 December 2024

Reports the foreach loops that can be safely replaced with in_array() or array_key_exists() calls.

See in_array (php.net) and array_key_exists (php.net) for details.