ID:               15682
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: WinXP
 PHP Version:      4.1.1
 New Comment:

Not a bug. You can only use static assignments here:

>From the manual @ http://www.php.net/manual/en/language.oop.php :

Note:  In PHP 4, only constant initializers for var  variables are
allowed. To initialize variables with non-constant values, you need an
initialization function which is called automatically when an object is
being constructed from the class. Such a function is called a
constructor (see below).

regards,
Derick


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

[2002-02-22 17:15:40] [EMAIL PROTECTED]

class foo {

var $bar = E_ALL & ~E_NOTICE;

}

Obviously a scalar value (assigning a single value works perfectly),
but
the following appears when it comes to execution:

Parse error: parse error, expecting "," or ";"

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

[2002-02-22 17:14:17] [EMAIL PROTECTED]

class foo {

$var bar = E_ALL & ~E_NOTICE;

}

Obviously a scalar value (assigning a single value works perfectly),
but the following appears when it comes to execution:

Parse error: parse error, expecting "," or ";"


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


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

Reply via email to