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.
Hi, class constants can't be arrays. The IDE con't check it. Example code: class A { const $a = array('hello' => 'world'); } Error message: Fatal error: Arrays are not allowed in class constants in ... on line ...
The $ character is not allowed in class constant names. The following code is handled without problems: class A { const a = array('hello' => 'world'); } The error message on your original code does not say that "arrays are not allowed in class constants", at least not when using the current dev build. The message only says there is a syntax error.
Example code was wrong, sorry. Just remove $ class A { const a = array('hello' => 'world'); }
The latter example works fine for me, what version of NetBeans are you using?
I've tested it on 6.5 and on 6.7beta. The IDE doesn't show any error messsage, but php 5.2.9-2 (windows) shows this error when you execute it: Fatal error: Arrays are not allowed in class constants in D:\temp\test.php on line 3
OK, I understand it now
Sorry for my english xD
reassigning to default owner
batch reassigning
Fixed in web-main #16b2f57ba42b