Re: [PHP-MIGRATION] OBJECTS FROM PHP3 to PHP4????
[email protected] Fri, 9 Jun 2000 15:06:08 +0200
| Newsgroups | php.migration |
|---|---|
| Message-ID | <[email protected]> |
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: [email protected]
> For additional commands, e-mail: [email protected]
> To contact the list administrators, e-mail: [email protected]
--
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