Re: Upgrade to PHP5 (beta)
Agelmar wrote:
> MeerKat wrote:
>
>>>I was wondering if my PHP4-Scripts will run under PHP5
>>
>> > (Haeven't tried the beta yet).
>>
>>Yes. PHP is always very good at backward compatibility and there
>>*should* be no reason why they wouldn't work.
>>
>>MK.
>
>
> I don't know that I'd quite go that far.... PHP is *usually* good at
> backwards compatability. I can't even guess how much money I made fixing
> scripts for companies when their IT-guys rolled out PHP 4.2.0, and that
> wasn't even such a big thing.
>
> Anyone remember anymore the change in if..endif syntax from PHP 2 to PHP 3?
> that broke a lot...
>
> PHP3 also used a new method to determine the type of a result... that caused
> odd quirks...
>
> And going from PHP3 to PHP4, man, I can't even remember how long it took me
> to track down errors caused by empty("0") == true... same with $var = "",
> isset($var) == true...
>
> So while I would say that php is usually good about backwards compatability,
> I would certainly not say always. Download PHP5, test it out (I checked out
> a build from CVS back in April, and have been testing since then...), and
> test out ALL your scripts THOROUGHLY. Make sure you have tested everything
> with php5 for a while before moving into production with php5 when it comes
> out. Personally, I will probably wait until 5.0.2 to roll out on my
> production server.
Testing is mandatory...
>
> (As for things that will break PHP5 - I'm trying to think... the MySQL libs
> are no longer included, this might cause problems for people who dont read
> readmes :-) Other than that, I'll sit back on the sidelines and watch for a
> while before jumping on the production bandwagon ^-^
MySQL problem should be solved by then, and the mysqli lib is worth the
move.
>
> // Ian Fette
> // Proponent comp.lang.php
>
>
The only thing that will really break the scripts is if your script
required the implicit object copy. It's quite easy to fix using
__clone() tought.
Other than the way objects are handled, there are not that many
differences between PHP4 and 5, even if that change makes an entire new
language.
|