From: kris dot hofmans at pandora dot be Operating system: Linux 2.4.21 PHP version: 5CVS-2003-10-31 (dev) PHP Bug Type: Scripting Engine problem Bug description: Unable to use CONST vars in other CONST vars
Description: ------------ I have had code that has been running with php5-dev versions since July, wich now won't parse anymore. I had declared a CONST in a class wich I used in another CONST below it, this now gives a: Parse error: parse error, expecting `','' or `';'' in /home/blacky/public_html/php5-dev/zen/ext/types.class.php on line 127 I am using PHP 5 Beta 2 (currently not in the list) Reproduce code: --------------- const NUMERIC = '0-9'; const SPACE = '\s'; const PUNCTUATION = SPACE . '\.,;\:&"\'\?\!\(\)'; const ALPHA_LCASE = 'a-z'; const E_ALPHA_LCASE = ALPHA_LCASE . '����������������������'; const ALPHA_UCASE = 'A-Z'; const E_ALPHA_UCASE = ALPHA_UCASE . '����������������������'; const ALPHA = ALPHA_LCASE . ALPHA_UCASE; const E_ALPHA = E_ALPHA_LCASE . E_ALPHA_UCASE; const ALPHA_NUM = ALPHA . NUMERIC; Expected result: ---------------- I expect the behaviour to be something like. const FOO = 'foo'; const BAR = 'bar'; const FOOBAR = FOO . BAR; and that an echo FOOBAR would give me the string 'foobar' Actual result: -------------- Parse error: parse error, expecting `','' or `';'' in /home/blacky/public_html/php5-dev/zen/ext/types.class.php on line 127 -- Edit bug report at http://bugs.php.net/?id=26050&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26050&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26050&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26050&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26050&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26050&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26050&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26050&r=support Expected behavior: http://bugs.php.net/fix.php?id=26050&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26050&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26050&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26050&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26050&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26050&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26050&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26050&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26050&r=float
