|
Posted by Evert | Rooftop Solutions on 08/14/05 22:04
Matthew Weier O'Phinney wrote:
>* Sebastian <sebastian@broadbandgaming.net> :
>
>
>>Matthew Weier O'Phinney wrote:
>>
>>
>>>* Sebastian <sebastian@broadbandgaming.net> :
>>>
>>>
>>>>why php6 and not php5? look how long it took to get to php4 (with php5
>>>>just starting to rolling out) and people are already talking about php6?
>>>>
>>>>
>>>My observation was that more people jumped to PHP4 from PHP3 than have
>>>so far from PHP4 to PHP5. And PHP5 has hardly just started to roll out;
>>>the official 5.0.0 release was over a year ago.
>>>
>>>
>>>
>>>>sure it is just a 'versioning' thing, but right now huge numbers of php
>>>>users aren't using php5 (including me) on production environments, let
>>>>alone start talking about php 6.
>>>>
>>>>
>>>And why aren't you using PHP5? Is there any specific reason? Is it
>>>because your service provider doesn't offer it? If so, ask them why --
>>>and report it here. As soon as PHP5 hit stable, I started using it, and
>>>I've never looked back. Performance is better, and there are many
>>>features -- exceptions, the new OOP model, autoload, iterators, etc. --
>>>that simply have no analogs in PHP4.
>>>
>>>
>>>
>>>>anyway, i think i will be with php4 for a long time to come.
>>>>
>>>>
>>>Please tell the list why -- what does PHP4 offer over PHP5 for you? I
>>>honestly want to know, and I'm sure there are others who would be
>>>interested to see why people are not making the switch
>>>
>>>
>>>
>>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.
>
>
>
The only thing I had to change to make my [30000 lines of code, OOP]
project PHP5 compatible was that I couldn't use the word exception,
because it was reserved in PHP5.
Right now I have better performance (around 50% better), and the system
uses less memory [ probably caused by the fact that objects are passed
by reference ]
Maybe we can make a list of things you have to think about before
migrating from PHP4 to 5.
Right now the only ones I can think of are:
* New reserved words
* If you rely on PHP4's object passing behaviour, your code will break
Anything else?
Evert
Navigation:
[Reply to this message]
|