Page 1 of 1

learning OOP, should i upgrade.

Posted: Wed Jun 15, 2005 4:02 am
by malcolmboston
Im currently in the midst of learning OOP / Class based programming, however my problem lies in that im using PHP 4.3.9 and i know OOP is somewhat a hack & slash job on PHP4.

here is my situation, i have quite a few clients, constantly developing new applications / sites for them, however i love doing personal projects and trying out new ideas and im looking to move over into an OOP based system, should i continue with PHP4, using the syntax that is available to it, and hacking around things that are'nt implemented in PHP4, thus making sure my code is compatable with web servers or upgrade to PHP5, use the new syntax and hope to god my sites dont die on commercial web servers that dont use PHP5 yet?

Serious answers only please, and does anyone know an expected world-wise rollout of PHP5?

Posted: Wed Jun 15, 2005 4:24 am
by shiznatix
i just starting using php once i got my new job and there are some cool perks to it. I would recomend changing to php 5 to keep up with the times, you don't want to be coding huge apps that may become obsolete after another php upgrade

Posted: Wed Jun 15, 2005 4:33 am
by malcolmboston
shiznatix wrote:I would recomend changing to php 5 to keep up with the times, you don't want to be coding huge apps that may become obsolete after another php upgrade
That is the problem, PHP5 is not the standard on web servers.

Posted: Wed Jun 15, 2005 4:53 am
by Syranide
Just for the facts, PHP4 can safely be run on PHP5 (there is even an option for it) ... and I run without it and it worked just as well for my projects.

However, I would say, if you like classes, then upgrade, there is nothing more wonderful than upgrading from PHP4 to PHP5. just auto-inclusion makes your life a little easier, exceptions, and (oh finally) classes are referenced by default.

Posted: Wed Jun 15, 2005 12:46 pm
by Sphen001
Well, as the differences between some parts of PHP aren't that different, I would see what the job requires. If your client knows they will be running the code on a PHP 5 server, go for it, otherwise use PHP 4. You shouldn't have a huge problem switching between them.

Hope this helps :D

Sphen001