NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page PHP 4 or 5

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

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 06-22-2006, 04:01 PM THREAD STARTER               #1 (permalink)
NamePros Member
Join Date: May 2006
Posts: 133
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, 04:11 PM   #2 (permalink)
Senior Member
 
lpxxfaintxx's Avatar
Join Date: May 2006
Location: Irvine, CA
Posts: 1,082
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, 04:23 PM   #3 (permalink)
Senior Member
 
RickM's Avatar
Join Date: Sep 2005
Location: Herts, UK
Posts: 3,796
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.
__________________
RickM

Web Design Forums - Over 22,000 Web Designers & Programmers just like you!
WSDReg - Affordable Domain Registration. Serving NP members since 2006!
RickM is offline  
Old 06-22-2006, 07:13 PM   #4 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
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, 07:16 PM   #5 (permalink)
Senior Member
 
lpxxfaintxx's Avatar
Join Date: May 2006
Location: Irvine, CA
Posts: 1,082
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, 08:02 PM   #6 (permalink)
Account Closed
 
abdulmueid's Avatar
Join Date: Jun 2005
Location: Mozambique
Posts: 607
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, 08:29 PM   #7 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
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, 08:59 PM   #8 (permalink)
Account Closed
 
abdulmueid's Avatar
Join Date: Jun 2005
Location: Mozambique
Posts: 607
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, 09:31 PM   #9 (permalink)
Senior Member
 
lpxxfaintxx's Avatar
Join Date: May 2006
Location: Irvine, CA
Posts: 1,082
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, 10:21 PM   #10 (permalink)
NamePros Regular
 
monaco's Avatar
Join Date: Jul 2005
Location: Tucson, AZ
Posts: 689
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, 11:29 PM   #11 (permalink)
Senior Member
 
scribby's Avatar
Join Date: May 2005
Location: Australia
Posts: 1,197
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 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-23-2006, 12:44 AM   #12 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
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.

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, 01:55 AM   #13 (permalink)
Account Closed
 
abdulmueid's Avatar
Join Date: Jun 2005
Location: Mozambique
Posts: 607
abdulmueid has a spectacular aura aboutabdulmueid has a spectacular aura about
 



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, 02:10 AM   #14 (permalink)
onArcade.com
 
hanz's Avatar
Join Date: Jul 2004
Location: Estonia
Posts: 1,224
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 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, 03:33 AM   #15 (permalink)
Account Closed
Join Date: May 2006
Posts: 57
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, 04:15 AM THREAD STARTER               #16 (permalink)
NamePros Member
Join Date: May 2006
Posts: 133
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 04:40 AM.
spacetrain is offline  
Old 06-23-2006, 05:17 AM   #17 (permalink)
Professional Monkey
 
Amnezia's Avatar
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 907
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
__________________
Webmaster Words
Amnezia is offline  
Old 06-23-2006, 05:49 AM   #18 (permalink)
Account Suspended
Join Date: Jun 2006
Location: Mumbai, India
Posts: 376
sundaybluez has a spectacular aura aboutsundaybluez has a spectacular aura about
 



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, 02:34 PM   #19 (permalink)
New Member
Join Date: Jun 2006
Posts: 10
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, 03:13 PM   #20 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,809
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
stscac is offline  
Old 06-23-2006, 06:11 PM   #21 (permalink)
Dan
Buy my domains.
 
Dan's Avatar
Join Date: Feb 2006
Posts: 2,796
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, 08:46 PM   #22 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,809
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
 



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.
????: NamePros.com http://www.namepros.com/programming/209852-php-4-or-5-a.html

-Steve
stscac is offline  
Closed Thread


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


Liquid Web Smart Servers  
All times are GMT -7. The time now is 08:52 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger