Edit report at http://bugs.php.net/bug.php?id=46216&edit=1
ID: 46216 Updated by: j...@php.net Reported by: xigamy at gmail dot com Summary: enhance const declaration -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: * PHP Version: 5.2.6 Block user comment: N Private report: N New Comment: See bug #30177 Previous Comments: ------------------------------------------------------------------------ [2008-10-02 08:51:26] xigamy at gmail dot com Description: ------------ I cannot declare a const a i would like to although i only use constant data. imho a concatenation of constant strings should be possible. the same as any operation on only constant values should be allowed. please? :-D Reproduce code: --------------- class SiteConfig { const HOST = 'www.test.com'; const DOC_ROOT = '/sites/aa/2484356/htdocs/'; const WEBMASTER_MAIL = 'webmas...@test.com'; const DEBUG = false; } class AppConfig { const HOME = SiteConfig::DOC_ROOT.'inc/lib/app/'; } Expected result: ---------------- AppConfig::HOME == '/sites/aa/2484356/htdocs/inc/lib/app/' Actual result: -------------- syntax error ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=46216&edit=1