Re: Class declaration, constants and array

From: Date: Fri, 28 Jan 2005 22:12:01 +0000
Subject: Re: Class declaration, constants and array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-207639@lists.php.net to get a copy of this message
t'isnt good OOP practice to do what you want to do in the first place perhaps use the constructor to do it On Fri, 2005-01-28 at 12:50, Marek wrote: > php5 class { > > const _SOMETHING_ = 'test'; > > private $abc=_SOMETHING_; // fails, well actually anything fails > similar to this. > var $test=$test2; // also fails > > So since I can not use dynamic var assignment within the class declaration, > what are some of the easy solutions to this ? without making anything global > to the script ? > > Thanks -- Regards, Matthew Fonda

« previous php.general (#207639) next »