Inspectopedia
 
2024.3

Foreach array is used as value

Warning
New
Last modified: 03 December 2024

Reports the variables that are used in a foreach loop as both an array expression and an array's key or value (for example, foreach ($items as $items) {}).

Commonly, this is the result of a typing error.