Re: [PHP] OOP variables

2004-04-15 Thread Chris Boget
> [quote] > 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 (se

Re: [PHP] OOP variables

2004-04-15 Thread Richard Harb
http://www.php.net/manual/en/language.oop.php states: [quote] 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.

[PHP] OOP variables

2004-04-15 Thread Jarratt Ingram
Hello, I was wondering if somebody would mind explaining this to me, is there a big difference or requirement to pre defining variables your going to use in a class eg: class name { $var1 = ''; $var2 = ''; function blah(){ $var2 }