Re: OBJECTS FROM PHP3 to PHP4????
| From: | thies at digicol dot de | Date: | Fri, 09 Jun 2000 13:06:08 +0000 |
| Subject: | Re: OBJECTS FROM PHP3 to PHP4???? | ||
| References: | 1 | Groups: | php.migration |
| Request: | Send a blank email to php-migration+get-13@lists.php.net to get a copy of this message | ||
On Thu, Jun 08, 2000 at 04:41:10PM -0700, Maxim wrote:
> in php.net is mentioned that "Static variable and class member
> initializers only accept scalar values (in PHP 3.0 they accepted any
> valid expression). The impact should be small, since initializers with
> anything but a simple static value rarely make sense."
>
> What alternatives if this sutuation arived? Is somebody knows any
> helpfull links regarding objects in PHP4?
>
> Thank you,
>
> Maxim
PHP3:
class tubu
{ var $time = time(); // a non scalar initialize;
}
the "same" in PHP 4:
class tubu
{ var $time;
function tubu() // constructor
{ $time = time();
}
}
what's the deal?
tc
>
>
>
>
> --
> PHP Migration Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-migration-unsubscribe@lists.php.net
> For additional commands, e-mail: php-migration-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany