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 268708

Summary: Syntax error when a method name is a PHP keyword
Product: php Reporter: Itako
Component: EditorAssignee: Tomas Mysik <tmysik>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Itako 2016-10-27 09:16:24 UTC
Method declaration "public function throw" causes a syntax error

unecpected: throw 
after: function 
expected: identifier, define, &

example code:
https://github.com/recoilphp/recoil/blob/master/src/Kernel/Listener.php:32
Comment 1 Itako 2016-10-27 09:18:44 UTC
This actually happens when any PHP keyword is used as the function name. 
The code runs just fine under PHP7 though.
Comment 3 Tomas Mysik 2016-10-27 10:10:14 UTC

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