Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow foreach by-reference #226

Open
dktapps opened this issue Aug 8, 2023 · 0 comments
Open

Disallow foreach by-reference #226

dktapps opened this issue Aug 8, 2023 · 0 comments

Comments

@dktapps
Copy link
Contributor

dktapps commented Aug 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant