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.
Product Version = NetBeans IDE Dev (Build 201707050001) Operating System = Windows 10 version 10.0 running on amd64 Java; VM; Vendor = 1.8.0_101 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.101-b13 Reproducibility: Happens every time STEPS: <?php class Foo { protected $status = 200; public function __construct() { echo ((string)$this->status)[0]; } } ACTUAL: Syntax error, unexpected [ after ) EXPECTED: No error reported (it's valid code since PHP/7.0.0). Fiddle: https://3v4l.org/toRuh
Reproducible. Thanks for reporting it!
Created attachment 164864 [details] screenshot
I've also fixed the missing unhandled errors: - foo()() - foo->bar()() - Foo::bar()() These are invalid in PHP5. I'm going to push my changes tonight or tomorrow. Thanks!
Unfortunately, web-main build fails now. I'll wait until it is fixed. Thanks.
Fixed. http://hg.netbeans.org/web-main/rev/ae733ed630f1 @kAlvaro Could you verify it when it is available in a dev build[1]? (Probably, tomorrow or later) [1] http://bits.netbeans.org/download/trunk/nightly/latest/ Thanks.
Integrated into 'main-silver', will be available in build *201708040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ae733ed630f1 User: Junichi Yamamoto <junichi11@netbeans.org> Log: #271109 - Bogus syntax error on ((string)$this->foo)[0] Also, fix missing unhandled errors(e.g. foo()(), foo->bar()(), Foo::bar()()).
@junichi11 Everything looks correct here. Thank you very much.
(In reply to kAlvaro from comment #7) > Everything looks correct here. Thank you for your verification!