vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

Improvement: warn about overriding variable of outer loop in the inner loop

Open esemlabel opened this issue 2 years ago • 0 comments

It is frequently occurrence issue that we occasionally override variable from outer loop by using the same name in the inner loop. PHPStrom can detect those, and it would be amazing if Inteliphense could do the same.

<?php
foreach ($foo as $value) {
	// code
	foreach ($bar as $value) {
		// code
	}
	// $value was overridden
}
image

esemlabel avatar May 05 '22 10:05 esemlabel