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.

Bug 190168

Summary: "Variable does not seem to be used in its scope" hint is not correct
Product: php Reporter: iliavlad
Component: CodeAssignee: issues@php <issues>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description iliavlad 2010-09-06 02:37:44 UTC
code
---
<?php
class A
{
    public function b()
    {
        $a = array();
        foreach ($a as $key) {
            $this->$key = 1;
        }
    }
}
---
There is hint "Variable does not seem to be used in its scope" on var $key in IDE.

It is not correct because of $key is used in $this->$key.
Comment 1 dharkness 2010-09-07 17:47:18 UTC

*** This bug has been marked as a duplicate of bug 170541 ***