From: xigamy at gmail dot com
Operating system: Any
PHP version: 5.2.6
PHP Bug Type: Class/Object related
Bug description: enhance const declaration
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 = '[EMAIL PROTECTED]';
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 bug report at http://bugs.php.net/?id=46216&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46216&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46216&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46216&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46216&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=46216&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46216&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46216&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46216&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46216&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46216&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46216&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46216&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46216&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46216&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46216&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46216&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46216&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46216&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46216&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46216&r=mysqlcfg