Re: include/require not allowed in classes?
| From: | Pavel Jartsev | Date: | Mon, 17 Nov 2003 08:35:20 +0000 |
| Subject: | Re: include/require not allowed in classes? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169903@lists.php.net to get a copy of this message | ||
Boyan Nedkov wrote:
Initializing data members ("var"-s) of a class with non-constant values is completely legal operation in PHP, so I don't think this could be a reason for the problem.hmmm... PHP manual says something else... http://www.php.net/manual/en/language.oop.php "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)." -- Pavel a.k.a. Papi