#32842 [Opn->Bgs]: Constants cannot have visibility modifiers
| From: | tony2001@php.net | Date: | Mon, 03 Apr 2006 11:43:56 +0000 |
| Subject: | #32842 [Opn->Bgs]: Constants cannot have visibility modifiers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95271@lists.php.net to get a copy of this message | ||
ID: 32842
Updated by: tony2001@php.net
Reported By: rael at grad dot icmc dot usp dot br
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Windows XP Professional with SP2
PHP Version: 5.0.4
New Comment:
Duplicate of bug #27022.
Previous Comments:
------------------------------------------------------------------------
[2005-04-26 15:13:49] rael at grad dot icmc dot usp dot br
Description:
------------
In a class, a constant cannot have visibility modifiers.
This is weird. In other languages, like Java, constants can be public
or private, etc.
Reproduce code:
---------------
<?
class MyClass{
private const foo = "foo";
}
?>
Expected result:
----------------
No runtime errors.
Actual result:
--------------
Parse error: syntax error, unexpected T_CONST, expecting T_VARIABLE in
D:\Develop\www\teste\const.php on line 4
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32842&edit=1