[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 06-22-2006, 03:01 PM   #1 (permalink)
NamePros Member
 
Join Date: May 2006
Posts: 133
10.00 NP$ (Donate)

spacetrain will become famous soon enoughspacetrain will become famous soon enough


PHP 4 or 5

Hey,

Im planning on coding a web 2.0 site and i know very little php so should i learn php 5 or php 4? Its just that ive heard php 5 is a tad buggy but that was months ago.

Thanks
spacetrain is offline  
Old 06-22-2006, 03:11 PM   #2 (permalink)
Senior Member
 
lpxxfaintxx's Avatar
 
Join Date: May 2006
Location: Irvine, CA
Posts: 1,060
261.85 NP$ (Donate)

lpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nice


I really, honestly, can not tell the difference between the two. They are almost the same.
lpxxfaintxx is offline  
Old 06-22-2006, 03:23 PM   #3 (permalink)
Senior Member
 
RickM's Avatar
 
Join Date: Sep 2005
Location: Herts, UK
Posts: 3,770
62.06 NP$ (Donate)

RickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant futureRickM has a brilliant future

Cancer Survivorship Save The Children Save The Children Cancer Animal Cruelty Child Abuse Cancer Survivorship 9/11/01 :: Never Forget Animal Cruelty Child Abuse Animal Rescue Animal Cruelty Protect Our Planet Protect Our Planet Protect Our Planet Animal Cruelty Save a Life
php5 has many new additions...php5 is now stable and good for production, however it cant hurt to do it in php4, that way you know its a bit more universal.
__________________
I am no longer a NP moderator -- please do not PM me with moderation requests!

~ VPSSpeed.com - Unmanaged VPS Hosting from $9.95
Get a FREE Mach-1 VPS PLAN with any order - Use the coupon FREEWHIZ
RickM is offline  
Old 06-22-2006, 06:13 PM   #4 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
 
Join Date: Feb 2006
Posts: 2,801
56.00 NP$ (Donate)

Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future

Autism Autism Autism Autism Autism Autism Autism
They are both basically the same, with PHP5 having a few more little things.

If you know PHP, you know PHP4 and PHP5..

Also, how can you plan to build a site if you can't code it? (Other than hiring someone..)
Dan is offline  
Old 06-22-2006, 06:16 PM   #5 (permalink)
Senior Member
 
lpxxfaintxx's Avatar
 
Join Date: May 2006
Location: Irvine, CA
Posts: 1,060
261.85 NP$ (Donate)

lpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nice


I guess he wants to learn..
lpxxfaintxx is offline  
Old 06-22-2006, 07:02 PM   #6 (permalink)
Account Closed
 
abdulmueid's Avatar
 
Join Date: Jun 2005
Location: Mozambique
Posts: 608
1.85 NP$ (Donate)

abdulmueid has a spectacular aura aboutabdulmueid has a spectacular aura about


I would suggest learn PHP5 mainly because it has a different way of handling XML and has full OOP support. If you want to create a web2.0 site, learn PHP5, it will make your life alot more easier.
abdulmueid is offline  
Old 06-22-2006, 07:29 PM   #7 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
 
Join Date: Feb 2006
Posts: 2,801
56.00 NP$ (Donate)

Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future

Autism Autism Autism Autism Autism Autism Autism
Can you explain why PHP5 would make his life a lot easier?
Dan is offline  
Old 06-22-2006, 07:59 PM   #8 (permalink)
Account Closed
 
abdulmueid's Avatar
 
Join Date: Jun 2005
Location: Mozambique
Posts: 608
1.85 NP$ (Donate)

abdulmueid has a spectacular aura aboutabdulmueid has a spectacular aura about


Here's how:
1. Re-Usable classes - No need to assign variables to data and process it though various functions individually.
2. No more tag checking and parsing individual XML tags with SAX etc. Just use SimpleXML class and have all the data available neatly in array form.
3. PHP5 has better exception handling, making it easier to debug the code.

There are plenty of new features that make life easier with PHP5.
abdulmueid is offline  
Old 06-22-2006, 08:31 PM   #9 (permalink)
Senior Member
 
lpxxfaintxx's Avatar
 
Join Date: May 2006
Location: Irvine, CA
Posts: 1,060
261.85 NP$ (Donate)

lpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nicelpxxfaintxx is just really nice


I don't think he's up to that level yet. Like he said, he knows very little php.
lpxxfaintxx is offline  
Old 06-22-2006, 09:21 PM   #10 (permalink)
NamePros Regular
 
monaco's Avatar
 
Join Date: Jul 2005
Location: Tucson, AZ
Posts: 695
314.80 NP$ (Donate)

monaco will become famous soon enough


If you're gonna learn, why not learn the latest version? I'd vote for PHP 5. Learning PHP4 would be like learning Java using J2SE 1.4.

Best learn the new features.
__________________
My Website | My Blog
monaco is offline  
Old 06-22-2006, 10:29 PM   #11 (permalink)
Senior Member
 
scribby's Avatar
 
Join Date: May 2005
Location: Australia
Posts: 1,196
44.72 NP$ (Donate)

scribby is a glorious beacon of lightscribby is a glorious beacon of lightscribby is a glorious beacon of lightscribby is a glorious beacon of lightscribby is a glorious beacon of lightscribby is a glorious beacon of light


I say always look to the future quit living in the past! if your coding your scripts for PHP4 then what about in 5 years when everyone is using PHP5..
scribby is offline  
Old 06-22-2006, 11:44 PM   #12 (permalink)
Senior Member
 
Peter's Avatar
 
Join Date: Nov 2003
Location: Scotland
Posts: 4,900
0.60 NP$ (Donate)

Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute

Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
I would personally recommend learning version 4 for the simple reason it is what is mostly used in servers at this current moment in time. php 5 if I remember correctly has been available for about 2 years and as of yet has not taken over from php 4.

Quote:
Originally Posted by Dan Friedman
They are both basically the same, with PHP5 having a few more little things.

If you know PHP, you know PHP4 and PHP5..

Also, how can you plan to build a site if you can't code it? (Other than hiring someone..)
They are wildly different. php 5 has alot more in it including better handling of object orientation. The reason you may not be able to tell the difference much at the moment is because the majority of hosts set it up so that it will work as close as possible to how php 4 works.

If php 5 is installed as is intended using the main default setup the majority of larger applications just will not run on the server.
Peter is offline  
Old 06-23-2006, 12:55 AM   #13 (permalink)
Account Closed
 
abdulmueid's Avatar
 
Join Date: Jun 2005
Location: Mozambique
Posts: 608
1.85 NP$ (Donate)

abdulmueid has a spectacular aura aboutabdulmueid has a spectacular aura about


Quote:
Originally Posted by lpxxfaintxx
I don't think he's up to that level yet. Like he said, he knows very little php.
Although he's not at that level yet, and I am sure he wont be using much of it at the beginning but the good news is that all of it is easy to learn. Classes are no dragons and SimpleXML is made such that anyone can understand and use it. I learnt PHP5 only, I have no problems working with PHP4 code and whenever I need to jump on PHP5 code, I am always happy to do so.
abdulmueid is offline  
Old 06-23-2006, 01:10 AM   #14 (permalink)
onArcade.com
 
hanz's Avatar
 
Join Date: Jul 2004
Location: Estonia
Posts: 1,235
541.85 NP$ (Donate)

hanz is a glorious beacon of lighthanz is a glorious beacon of lighthanz is a glorious beacon of lighthanz is a glorious beacon of lighthanz is a glorious beacon of light

Animal Rescue Animal Rescue Animal Rescue Animal Cruelty
I would suggest you to make it compatible with both. Yes, most of the servers are still using PHP4, but there are already some that use only PHP5.
hanz is offline  
Old 06-23-2006, 02:33 AM   #15 (permalink)
Account Closed
 
Join Date: May 2006
Posts: 57
16.60 NP$ (Donate)

MixedByDJs is on a distinguished road


PHP4.

PHP5 isnt accepted by older scripts/servers ect. You could use PHP5 but id recommend PHP4 for a while. Ive used 5 and experienced problems with a few things, incompatibility being one of them.
MixedByDJs is offline  
Old 06-23-2006, 03:15 AM   #16 (permalink)
NamePros Member
 
Join Date: May 2006
Posts: 133
10.00 NP$ (Donate)

spacetrain will become famous soon enoughspacetrain will become famous soon enough


Ok i decided to order a php and mysql book from amazon and this book covers PHP5, if that means paying more to get a php5 host well it will have to do

Last edited by spacetrain; 06-23-2006 at 03:40 AM.
spacetrain is offline  
Old 06-23-2006, 04:17 AM   #17 (permalink)
Professional Monkey
 
Amnezia's Avatar
 
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 908
13.25 NP$ (Donate)

Amnezia has a spectacular aura aboutAmnezia has a spectacular aura about

Cancer Survivorship Save a Life
I would definately learn php5 if your server supports it, php4 and php5 are miles apart. i learnt 4 and know am having to play catch up to get to grips with version 5
__________________
[http://www.webmasterwords.com/python-split-and-join-examples]Python Tutorials[/url]
Amnezia is offline  
Old 06-23-2006, 04:49 AM   #18 (permalink)
NamePros Regular
 
Join Date: Jun 2006
Location: Mumbai, India
Posts: 328
0.00 NP$ (Donate)

sundaybluez will become famous soon enoughsundaybluez will become famous soon enough


PHP4.
Work on to that. if you are coding your own website, keep it simple & easy to code.
No need of OOPS concept for a normal website, procedure based programming is fine.

Also I dont think so that he needs exception handling, SAX at this stage.
Even to process XML their many classes out there on the net which break xml to an array.

Well dude don't just use a latest version because it is new, keep your goal in front of everything else.

Looking for fast, quick output and less time on maintainance then use PHP4.

Also many server still do not have PHP5 on to them.
sundaybluez is offline  
Old 06-23-2006, 01:34 PM   #19 (permalink)
New Member
 
Join Date: Jun 2006
Posts: 10
13.85 NP$ (Donate)

Prch is an unknown quantity at this point


I would say PHP 4 because of versions available on most hosting.

But if you start learning now and if it will take you 2 years to learn and create a site, then start with PHP 5.
Prch is offline  
Old 06-23-2006, 02:13 PM   #20 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
 
Join Date: Aug 2004
Posts: 3,794
47.60 NP$ (Donate)

stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of


Site5 provides the option to choose PHP4 or PHP5 through htaccess

**Wants to add affiliate code, but doesn't - because its against the site rules**

-Steve
__________________
Follow Me on Twitter:
stscac is offline  
Old 06-23-2006, 05:11 PM   #21 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
 
Join Date: Feb 2006
Posts: 2,801
56.00 NP$ (Donate)

Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future

Autism Autism Autism Autism Autism Autism Autism
I have PHP4 and PHP5 installed on my computer. I can change back and forth with the click of a button.

I code the same no matter which version I am using, and my code works the same with both versions.

As far as I can tell, the only difference might be more functions and maybe it does some things faster.

I didn't set it up to run anything like anything else. All I did was install it.
Dan is offline  
Old 06-23-2006, 07:46 PM   #22 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
 
Join Date: Aug 2004
Posts: 3,794
47.60 NP$ (Donate)

stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of


Quote:
Originally Posted by Dan Friedman
I have PHP4 and PHP5 installed on my computer. I can change back and forth with the click of a button.

I code the same no matter which version I am using, and my code works the same with both versions.

As far as I can tell, the only difference might be more functions and maybe it does some things faster.

I didn't set it up to run anything like anything else. All I did was install it.
Chances are that you're not using the new functions installed with PHP5, which is why it works in both environments.

-Steve
__________________
Follow Me on Twitter:
stscac is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 12:48 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85