ID: 26050
Updated by: [email]sniperphp.net[/email]
Reported By: kris dot hofmans at pandora dot be
-Status: Open
+Status: Bogus
Bug Type: Zend Engine 2 problem
Operating System: Linux 2.4.21
PHP Version: 5CVS-2003-10-31 (dev)
New Comment:

"Head up! I'm reverting the patch which allows for expressions in
constant declerations. Allowing the access of other constants in this
code is flawed. We are reverting back to PHP 4's static scalars." --
Andi



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

[2003-10-31 05:23:49] kris dot hofmans at pandora dot be

Description:
------------
I have had code that has been running with php5-dev versions since
July, wich now won't p anymore.

I had declared a CONST in a class wich I used in another CONST below
it, this now gives a:
P error: p 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:
--------------
P error: p error, expecting `','' or `';'' in
/home/blacky/public_html/php5-dev/zen/ext/types.class.php on line 127


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


--
Edit this bug report at [url]http://bugs.php.net/?id=26050&edit=1[/url]