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: | Wrong uninitialized prompt | ||
---|---|---|---|
Product: | php | Reporter: | fcjailybo |
Component: | Editor | Assignee: | Tomas Mysik <tmysik> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | the prompt screeshot |
Well, this seems to be correct because e.g. in Java, this would be an error. You would need to type something like this: $sk = null; try { $sk = 'knight'; $this->testexp(); } catch (Exception $exc) { echo $exc->getMessage() . '<br>'; echo $sk; } But this is not necessary in PHP so there should not be any warning here. Thanks for reporting. |
Created attachment 152991 [details] the prompt screeshot I use try {} catch{},code like follow: public function test() { try { $sk = 'knight'; $this->testexp(); } catch (Exception $exc) { echo $exc->getMessage() . '<br>'; echo $sk; } } I define $sk at try {}, and use it at catch{}, but the IDE prompt me that $sk seems to be uninitialized.