phpstan-strict-rules icon indicating copy to clipboard operation
phpstan-strict-rules copied to clipboard

Disallow foreach by-reference

Open dktapps opened this issue 1 year ago • 0 comments

Since the variables of foreach can leak out of the foreach, some very surprising things can happen:

https://3v4l.org/b90aa

No error is currently reported; in fact, PHPStan is convinced that no modification took place: https://phpstan.org/r/55072247-b575-43dc-af87-634ddf8f4852

dktapps avatar Aug 08 '23 15:08 dktapps