Page 1 of 2

php 5 ?

Posted: Fri Aug 04, 2006 1:57 am
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.

Posted: Fri Aug 04, 2006 2:01 am
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.

Posted: Fri Aug 04, 2006 2:09 am
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. :)

Posted: Fri Aug 04, 2006 2:12 am
by Luke
PHP 5 made me understand OOP much better. Here is a good overview:

http://www.zend.com/php5/articles/engin ... hanges.php

Posted: Mon Aug 07, 2006 1:43 pm
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.

Posted: Mon Aug 07, 2006 1:47 pm
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.

Posted: Mon Aug 07, 2006 5:13 pm
by Ambush Commander
Well, the good hosts support PHP 5. All three hosts I'm on right now support PHP 5.

Posted: Mon Aug 07, 2006 5:18 pm
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

Posted: Mon Aug 07, 2006 5:27 pm
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 :))

Posted: Mon Aug 07, 2006 6:03 pm
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

Posted: Mon Aug 07, 2006 6:04 pm
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.

Posted: Mon Aug 07, 2006 6:07 pm
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?

Posted: Mon Aug 07, 2006 6:17 pm
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 *

Posted: Mon Aug 07, 2006 6:51 pm
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.

Posted: Mon Aug 07, 2006 6:53 pm
by Ambush Commander
You mean these?