ID: 31554 Updated by: [EMAIL PROTECTED] Reported By: pcarmody at c-spanarchives dot org -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: SunOS 5.8 PHP Version: 5.0.3 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php . Previous Comments: ------------------------------------------------------------------------ [2005-01-14 16:16:23] pcarmody at c-spanarchives dot org Description: ------------ Attempting to use a function to generate the value for assignment to a class constant causes a parse error. Reproduce code: --------------- <?php class MyClass { const good = "Blah"; // will work const bad = substr(0, 3, "Blah"); // results in parse error } ?> Actual result: -------------- Parse error: parse error, unexpected '(', expecting ',' or ';' ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31554&edit=1