![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
PHP Developers... please join me for a discussion on PHP5.
We all know that PHP5 is better than PHP4... that's great. But can you give some real world (maybe personal) examples of yours where you've found PHP5 to be preferred over PHP4.
Don't get me wrong with this thread, I have my own to share but I'd like to have this more as an informative thread for all developers to learn and share. It's one thing to read up the new features and new terminology... but I'd love to hear anyone who's been developing for PHP5 to share personal experiences. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
Well, personally the main advantage of 5 over 4 for me is the additional functions. SimpleXML for example, makes parsing xml significantly easier. The addition of file_get_contents/file_put_contents (I forget which was added in php5) has also made it much easier to work with flat files.
Additionally, php4 has had its end of life announcement, and as of the new year no additional versions of php4 will be released. The only incompatibilities between scripts I've seen for php4 not running under php5, is due to register_globals being off by default in php5.
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Nov 2002
Posts: 880
|
Also be careful with the use of array_merge in your code when moving from php4 to 5
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2002
Posts: 34,431
|
Quote:
__________________
I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
Ok, so SimpleXML makes xml easier.
array_merge() now only takes array types rather than just allowing anything to be merged in. Register_globals is now off by default, as it should be. Awesome stuff... has anyone been doing some more advanced class/object creation using PHP5 yet? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Oct 2002
Location: European Union
Posts: 1,752
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Jan 2006
Location: Gringo in Puerto Rico
Posts: 4,204
|
SimpleXML hands down. Parsing feeds is effortless.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: May 2002
Location: MI
Posts: 1,827
|
There were a lot of enhancements to php5, security fixes, speed fixes as well as OOP changes. Things like private, public and static functions etc. PHP5 should be used imho over php4, but hosts have done a poor job of getting php5 in the market place. That being said, php5 has major issues like namespaces. To me PHP5 has pretty much died and most of my stuff has been replaced with other languages that are not only faster but much more structured.
PHP6 is going to have a lot of these things fixed supposedly , but I will believe it when I see it.
__________________
Latest MMA news. http://www.mmawrapup.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
Not that I can see, the way it handles child classes and brand new function structures such as __constructor().
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |