From:             rael at grad dot icmc dot usp dot br
Operating system: Windows XP Professional with SP2
PHP version:      5.0.4
PHP Bug Type:     Feature/Change Request
Bug description:  Constants cannot have visibility modifiers

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 bug report at http://bugs.php.net/?id=32842&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32842&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32842&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32842&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32842&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32842&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32842&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32842&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32842&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32842&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32842&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32842&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32842&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32842&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32842&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32842&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32842&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32842&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32842&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32842&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32842&r=mysqlcfg

Reply via email to