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

Report usage of "&" in foreach declaration as an error #80

Open
aik099 opened this issue Jun 3, 2015 · 0 comments
Open

Report usage of "&" in foreach declaration as an error #80

aik099 opened this issue Jun 3, 2015 · 0 comments

Comments

@aik099
Copy link
Owner

aik099 commented Jun 3, 2015

Using & inside foreach declaration results in reference being kept after foreach is done interating and can lead to hard to catch errors.

foreach ($array as &$element) { ... }
foreach ($array as &$key => &$element) { ... }
foreach ($array as $key => &$element) { ... }
foreach ($array as &$key => $element) { ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant