ID:               38711
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jd at trickytools dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Compile Failure
 Operating System: Linux RedHat 4
 PHP Version:      5.1.6
 New Comment:

Expressions cannot be executed in compile time, when class
constants/members are declared.
This is expected behaviour.


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

[2006-09-04 11:25:41] jd at trickytools dot com

Description:
------------
It seems that initializing static class member with constant expression
generates a syntax error

Reproduce code:
---------------
<?php
class C {
static public $m = 1 + 2;  // syntax error !
};
?>


Expected result:
----------------
There should not be any compilation error

Actual result:
--------------
PHP Parse error:  syntax error, unexpected '(' in
/var/www/html/test.php on line 3



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


-- 
Edit this bug report at http://bugs.php.net/?id=38711&edit=1

Reply via email to