#27022 [Opn]: Class constant has no visibility modificator

From: Date: Tue, 27 Jan 2004 20:59:16 +0000
Subject: #27022 [Opn]: Class constant has no visibility modificator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-53997@lists.php.net to get a copy of this message
 ID:               27022
 Updated by:       sniper@php.net
 Reported By:      andrey@php.net
 Status:           Open
 Bug Type:         Zend Engine 2 problem
 Operating System: *
 PHP Version:      5CVS-2004-01-23 (dev)
 New Comment:

Isn't this more of a feature request?



Previous Comments:
------------------------------------------------------------------------

[2004-01-23 12:47:45] andrey@php.net

Description:
------------
It is not possible to use visibility modificator like
public/protected/private on a class constant.

Reproduce code:
---------------
php -r "class fubar { protected const some_const = 123; }"

Actual result:
--------------
PHP Parse error:  parse error, unexpected T_CONST, expecting T_VARIABLE
in Command line code on line 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27022&edit=1


Thread (8 messages)

« previous php.bugs (#53997) next »