ID:               33353
 Updated by:       [EMAIL PROTECTED]
 Reported By:      joe at bigeasy dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: linux 2.6.11
 PHP Version:      5.0.4
 New Comment:

Duplicate of bug #30177.


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

[2005-06-15 16:16:32] joe at bigeasy dot com

Description:
------------
similar to bug request 31554, http://bugs.php.net/bug.php?id=31554

can const be modified to be assigned output from an expression, similar
to the define() function?


Reproduce code:
---------------
define( 'TEST1', 3+3); //works
class devil {
    const TEST2 = 3+3; //parse error unexpected '+'
    const TEST3 = (3+3); //parse error unexpected '('
    public function __construct() {
        echo TEST1;
        echo self::TEST2;
        echo self::TEST3;
    }
}
$obFoo = new devil();

Expected result:
----------------
666

Actual result:
--------------
Parse error: parse error, unexpected '+', expecting ',' or ';'


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


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

Reply via email to