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 - Syntax error when a method name is a PHP keyword
Summary: Syntax error when a method name is a PHP keyword
Status: RESOLVED DUPLICATE of bug 262141
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 09:16 UTC by Itako
Modified: 2016-10-27 10:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***