Jump to content


Photo

PHP 4 to 5


  • Please log in to reply
2 replies to this topic

#1 Fyorl

Fyorl
  • Members
  • PipPipPip
  • Advanced Member
  • 273 posts
  • LocationUK

Posted 08 June 2006 - 06:09 PM

The Elemental Design team were thinking of switching to better hosts and the one chosen gives the option of having PHP 4 or 5 installed on the server. Since I'm the Lead Programmer, the decision fell to me and I've read up a bit on the differences between the two but they don't have much relevance to me and Elemental Design.

I've used object-orientation and apparently one of the main differences between PHP 4 and 5 is its object-oriented (shouldn't that be orientated?) stuff. I was just wondering if I would have to rewrite all my classes to use stuff like __constructor where previously I'd just been using the class name as the method name or if it's back-compatible and either will work? If I do have to re-write them, is it worth it?

Thanks
[table]



Don't worry, the printer fairies will sort it out.

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 08 June 2006 - 06:29 PM

[a href=\"http://www.php.net/manual/en/migration5.php\" target=\"_blank\"]Here[/a] is what the manual has to say.

There are plenty of reasons to switch to php5, especially if you like using objects. The is allot of real OOP methods available in 5 that are simply not htere in 4.

#3 Fyorl

Fyorl
  • Members
  • PipPipPip
  • Advanced Member
  • 273 posts
  • LocationUK

Posted 08 June 2006 - 06:53 PM

Thanks for that, migrating to PHP shouldn't be a problem and any new bugs should be easily ironed out without much effort. The thing is, I liked the simpler, PHP 4 way of doing OOP. PHP 5 doesn't seem worth it as I can't see myself using any of the new features.
[table]



Don't worry, the printer fairies will sort it out.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users