#20437 [Opn->Bgs]: static $m=1|2;
| From: | derick@php.net | Date: | Fri, 15 Nov 2002 07:03:46 +0000 |
| Subject: | #20437 [Opn->Bgs]: static $m=1|2; | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-24940@lists.php.net to get a copy of this message | ||
ID: 20437
Updated by: derick@php.net
Reported By: rrobin@greenapple.com
-Status: Open
+Status: Bogus
-Bug Type: Compile Failure
+Bug Type: Scripting Engine problem
Operating System: BSDI
PHP Version: 4.2.1
New Comment:
From 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).
Previous Comments:
------------------------------------------------------------------------
[2002-11-14 21:45:20] rrobin@greenapple.com
it seems that i cannot do
static $m=1|2|4;
getting rid of the static would compile it.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20437&edit=1