This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Ignore some cases of unused variables | ||
---|---|---|---|
Product: | php | Reporter: | dharkness <dharkness> |
Component: | Editor | Assignee: | Tomas Mysik <tmysik> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
dharkness
2014-09-04 18:17:53 UTC
Makes sense, thanks. The first case is especially tricky when iterating over object properties, since foreach (array_keys($object) as $key) { echo $key . PHP_EOL; } doesn't work (the workaround here is even more bloated), while foreach ($object as $key => $value) { echo $key . PHP_EOL; } is fine. Indeed, but I don't think it matters for the fix. Not using the $value in a foreach should never produce a warning IMHO. |