Posted by Oliver Grδtz on 11/21/07 19:06
FFMG schrieb:
> I am slowly moving my code to php5.
Hurry up! http://gophp5.org/
> But I would like to make it backward compatible in case something bad
> happens, (and to make sure I understand what the changes are).
>
> function TestClass() // For php4
> {
> $this->__construct();
> }
Very. Bad. Idea. Do not touch the PHP4 style constructors until you
finally stop supporting PHP4 in your application. Plan on doing this
QUICKLY! PHP4 dies! You had three and a half years time to switch to PHP5...
You will see the reference vs. copy issue explained by Rik Wasmus
everywhere in your application. PHP5 defaults to giving you references
instead of copies and the once almost-always-needed & operators left
over from your PHP4 code will in fact lead to a higher memory
consumption than necessary under PHP5 caused by the details in the
memory management of the Zend Engine but besides that your programm will
still run fine.
OLLi
--
"I hit him with a shovel." "Is he conscious?" "Yes.." "Then hit him again."
[Alias 507]
[Back to original message]
|