Re: 'God' has spoken... :-)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Weier O'Phinney wrote:

* Sebastian wrote:
i spent hundreds of hours building my site on php4,
im not about to rewrite any of it to make it 'compatible' with php5.

Don't rewrite it to make it compatible with PHP5 -- rewrite it to take
advantage of PHP5's better performance and new features. Besides, you
probably will not need to rewrite any code -- probably just do some
cleanup and a few changes. More below.

maybe my impressions of php5 are wrong, but last i heard apps built on php4 may or may not work right under php5
- meaning you would have to rewrite code. am i wrong?

I've converted quite a bit of "PHP4" code to PHP5, and I've had very few
problems. Typically, I find that I get a few notices about deprecated
functions or some warnings -- and the warnings are usually about things
that should have generated warnings in PHP4, didn't, but now do in PHP5
(things like declaring a class property twice, for instance).

The fixes for these are typically not rewrites, but, as I said, fixes --
if anything, they make the code better.

Additionally, it's fairly easy to make such code backwards compatible
with PHP4, if you feel the need to do so.
so i am 'afraid' of going with php5 in fear it will break my website.

The only way to find out if it will break is to try it. I'm willing to
wager that your code, if written well, will not only *not* break, but
likely perform better.


explain "better performance".

if i have a script written on php4 and i run it on php5 i doubt its going to be any faster.. even so, i don't think there is much if at all any speed gain from php4 to php5... speculating of course, but i have yet to read any evidence php5 is faster than php4.

a few extra features isn't enough to convince *most* to switch to php5. now if they say php5 is 20% faster than php4 than i would upgrade overnight ;)


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.8/71 - Release Date: 8/12/2005

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux