> [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 (see below).
> [/quote]

Another thing to consider is whether your class needs to or could be
accessed statically.  If it can then whatever variables you might need
in executing the class methods can't be solely defined in the constructor.
When used statically, the class' constructor is (obviously) never run.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to