learning OOP, should i upgrade.

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

learning OOP, should i upgrade.

Post 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?
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post 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
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post 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.
Syranide
Forum Contributor
Posts: 281
Joined: Fri May 20, 2005 3:16 pm
Location: Sweden

Post 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.
Sphen001
Forum Contributor
Posts: 107
Joined: Thu Mar 10, 2005 12:24 pm
Location: Land of the Beaver

Post 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
Post Reply