tags:

views:

146

answers:

4

I'm using PHP 5.2.11. I've seen that 5.3 version has several backward incompatibility issues and because of that some code might require changes.

Since my website is hosted on shared server, many have suggested that those server won't upgrade to 5.3 in near future (probably due to incompatibility issues for many shared users).

Would it be wise to develop a new project in 5.3 which would be hosted on shared server?

A: 

If you will not decide to use php-5.3-only features - then why do you need to get an additional headache? ;-)

zerkms
@zerkms: If you visit the link I mentioned, you'd see that existing 5.2 code could produce warnings (and may be errors). For example, array_multisort() gives warning : Parameter 2 to array_multisort() expected to be a reference, value given.
understack
so? 5.3 doesn't bring any features that i need in php (5.2) - so for me there are no any reasons to migrate. do **you** have such reasons?
zerkms
+6  A: 

For an application hosted on a shared server, on which you are not administrator, I would not suggest using the new features of PHP 5.3 right now, no.

It has taken a couple of years (if not more) for previous versions to get installed on a majority of servers ; it'll probably take some time for PHP 5.3 to be widely available.

So, if you want your application to work on shared hosting, PHP 5.2 is probably still the best choice you can make ; at least for 1 year or 2, I suppose...


Considering that :

  • the big frameworks will require PHP 5.3 for their next version somewhere in the second half of 2010 or beginning of 2011
  • applications will probably begin using those frameworks (and, so, require PHP 5.3) in the second half of 2011
  • such applications will probably not become widely used before the end of 2011
  • So, there will probably be no need for hosting services to upgrade from 5.2 to 5.3
  • especially considering this might break a lot of existing web-sites on their servers..


If you had been administrator of the server, on the other hand, I would probably not have given the same answer... PHP 5.3 is really great, and provides nice features...

So, if you know you'll have a server with PHP 5.3, I would say : go for it ! Even if it means that you'll have to correct a few bugs.

Pascal MARTIN
+1 it*s not for shared servers yet, at least for a year if not longer. Very fine answer with very good points.
Pekka
As Pekka said, this is a fine answer; helped me decide which to focus on.
James Skemp
+2  A: 

Interesting. Have you seen the list of significant improvements?

Check it out and decide whether potential pain of rewriting few lines of code is adequate to all awesomeness the newer versions provides.

rochal
A: 

Check a forum on your hosting if there're problems. But if there's no rush and you don't need to switch I'd wait and maybe I'd try to use PHP 5.3 in a new project.

The backward incompatible changes seems to me more than acceptable.

MartyIX