php 5 ?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

php 5 ?

Post by rsmarsha »

Not sure if this is the right forum area for it but hey. :)

My host currently works on php4 but they have said i can move to a php5 server they have setup if i like. What are the advantages/disadvantages of 5 over 4.

I know i can read up on this too, but wanting to ask the opions of those that have used both.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

google it but ill give you the jiff.

-much better OOP support. I mean much better. If you don't use OOP now, you will in the future and you will be happy you switched.
-new functions! some that you may not use, some that you may. One of my favorites is file_put_contents() which keeps you from having to fopen, fwrite, fclose and the sort. There are many others, thats just one off the top of my head.

But php6 is coming down the pipes ultra fast. The php docs have already started being updated. Go and poke around in the manual and you can find some things saying 'in php6 this is changed to act like this...'. Keep up with the current versions of your language so you don't get left in the dust.
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

Post by rsmarsha »

Thanks. :)

I don't use OOP much at the moment but am looking to change jobs to get more experience. In my current job i'm a sole dev and the MD likes to keep the code at a level he can understand, lol.

I'll ask about changing my sites to php5 then. :)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

PHP 5 made me understand OOP much better. Here is a good overview:

http://www.zend.com/php5/articles/engin ... hanges.php
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

You want PHP 5. Its better even if you aren't interested in OOP.
I'd say PHP 5 is a must have if you have the choice because you don't want to limit yourself later.
alvinphp
Forum Contributor
Posts: 380
Joined: Wed Sep 21, 2005 11:47 am

Post by alvinphp »

as a language i would say there is no disadvantage going to 5. it is better in every way. some issues to think about though is if you are trying to migrate an existing php 4 site to 5 you might have issues and you will also have limited hosting choices as a lot of hosts still do not support 5.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Well, the good hosts support PHP 5. All three hosts I'm on right now support PHP 5.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I'm trying to configure a news module I build in PHP5 to work in PHP4 right now and it's pretty craptacular
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

shiznatix wrote:But php6 is coming down the pipes ultra fast. The php docs have already started being updated. Go and poke around in the manual and you can find some things saying 'in php6 this is changed to act like this...'. Keep up with the current versions of your language so you don't get left in the dust.
Really? It's already appearing in the manual. Time to get another CVS snapshot and have a play :)

(I have a PHP6 test center running on a separate IP :))
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Does anybody actually know what is changing in PHP 6? This is the sum of my total knowledge:
  • Unicode
  • Some legacy PHP 4 stuff removed, not sure what
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

ole wrote:Does anybody actually know what is changing in PHP 6? This is the sum of my total knowledge:
  • Unicode
  • Some legacy PHP 4 stuff removed, not sure what
Namespaces are supposed to be in there too.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

http://www.php.net/~derick/meeting-notes.html is a good read even though it's a year old. They also keep news.txt in the snapshots up to date, you can check out those.

I'd rather not want to have to support three versions at once, so could we please all get off PHP 4 now?
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Namespaces are supposed to be in there too.
Whoa really? I thought that was really difficult i.e. never gonna happen yays!
http://www.php.net/~derick/meeting-notes.html is a good read even though it's a year old. They also keep news.txt in the snapshots up to date, you can check out those.
I thought I'd read that twice already but a lot seems new has this been updated or do I just have a bad memory?
* ole reads with delight *
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Well that sounds really cool.
One thing not mentioned in there is setter and getter functions like in C# and Java, I would really like those.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

You mean these?
Post Reply