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 270092 - method names that are PHP keywords marked as syntax errors
Summary: method names that are PHP keywords marked as syntax errors
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: issues@php
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-16 14:22 UTC by neufena
Modified: 2017-03-28 23:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Syntax error for valid PHP7 code (1.67 KB, image/png)
2017-03-16 14:22 UTC, neufena
Details

Note You need to log in before you can comment on or make changes to this bug.
Description neufena 2017-03-16 14:22:54 UTC
Created attachment 163863 [details]
Syntax error for valid PHP7 code

As of PHP7 keywords can be used as property, constant, and method names (except class may not be a constant).  See http://php.net/manual/en/reserved.keywords.php.

For example:

class Factory
{
    public static function new()
    {
        //code to create something new
    }
}
Comment 1 junichi11 2017-03-28 23:09:28 UTC

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