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 254474 - Accessing an index from a constant array using PHP 5.6 triggers syntax error
Summary: Accessing an index from a constant array using PHP 5.6 triggers syntax error
Status: RESOLVED DUPLICATE of bug 250579
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-18 09:21 UTC by OskarD
Modified: 2015-10-21 14:33 UTC (History)
1 user (show)

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 OskarD 2015-08-18 09:21:52 UTC
<pre>
    const CONSTANT_ARRAY = [1, 2];
    
    public function getSecondIndex()
    {
        return self::CONSTANT_ARRAY[1]; // Syntax error
    }
</pre>
The syntax error:
<pre>
unexpected:[
after: identifier 'CONSTANT_ARRAY'
expected: instanceof, as, =>, } ...
</pre>
Comment 1 junichi11 2015-10-21 14:33:26 UTC

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