Unstoppable Domains

PHP 4 or 5

Spaceship Spaceship
Watch

spacetrain

Established Member
Impact
8
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
 
1
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
I really, honestly, can not tell the difference between the two. They are almost the same.
 
0
•••
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.
 
0
•••
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..)
 
0
•••
I guess he wants to learn..
 
0
•••
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.
 
0
•••
Can you explain why PHP5 would make his life a lot easier?
 
0
•••
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.
 
1
•••
I don't think he's up to that level yet. Like he said, he knows very little php.
 
0
•••
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.
 
0
•••
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..
 
0
•••
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.

Dan Friedman said:
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.
 
0
•••
lpxxfaintxx said:
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.
 
0
•••
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.
 
0
•••
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.
 
0
•••
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 :D
 
Last edited:
0
•••
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
 
0
•••
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.
 
0
•••
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. :hehe:
 
0
•••
Site5 provides the option to choose PHP4 or PHP5 through htaccess :tu:

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

-Steve
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back