Page 1 of 1

Easy to develop application to support PHP4 and PHP5?

Posted: Fri Aug 18, 2006 8:37 pm
by georgeoc
Hi,

I have until now been developing my Open Source app for PHP 4 exclusively, as I have to support a wide user-base who mostly don't yet have access to PHP 5. However, I have just been wondering how hard it is to make an application work without errors in both PHP 4 and 5. I would love to develop for both versions simultaneously if it's not to complex, as it opens up the most possibilities for my users.

I'm sure this topic has been thrashed to death in many discussions, but I would appreciate a link or two to sites which comprehensively list the areas to consider when porting a PHP 4 app to run in both PHP 4 and 5. I am aware of the improvements in v5, and believe me, I would drop v4 now if I had the choice, but I really can't. All I'm looking for is a list of problem areas and possible solutions to make the code friendly to both versions (for instance, how to deal with the different forms of class constructor).

Thanks!

Posted: Fri Aug 18, 2006 8:46 pm
by Luke
you wrote:how to deal with the different forms of class constructor
using ph4 style constructors doesn't cause any problems in php5

Posted: Fri Aug 18, 2006 8:48 pm
by georgeoc
Thanks. What about other issues? :wink:

Posted: Fri Aug 18, 2006 8:51 pm
by RobertGonzalez

Posted: Fri Aug 18, 2006 8:52 pm
by georgeoc
Marvellous!

I think I'm going to be very happy here at devnetwork.

Posted: Fri Aug 18, 2006 9:02 pm
by Ambush Commander
E_ALL is usually no problem for PHP 4 and 5. You'll run into troubles if you try to go E_STRICT in PHP 5 though.

Posted: Fri Aug 18, 2006 9:04 pm
by Luke