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.
It would nice to suppress warnings in intentional code. For example: foreach($myarray as $dummy => $value) { //@SuppressWarning unused variable echo $value; } unset($dummy); //hack to keep Netbeans from complaining
I agree with the general statement, but in your code block, couldn't you just do: foreach ($myarray as $value) { echo $value; }
I think you meant foreach (array_values($myarray) as $value) { echo $value; } but I'm not sure, what the impact on performance is, including memory, just to silence Netbeans. This is meant as a simple illustration of slightly ugly, but correct code, that draws unneeded attention. Actually, you made my point for me. Netbeans's syntax checker is intended to find & reduce errors. Accommodating it actually hid & caused an error.
Hi, This doesn't occurs anymore on the 8.2 rc version (dev 201609210002). Feel free to reopen the ticket if the problem isn't solved on your configuration. Regards