SitePoint Sponsor

User Tag List

View Poll Results: PHP 4 or 5?

Voters
271. You may not vote on this poll
  • PHP 4

    61 22.51%
  • PHP 5

    210 77.49%
Page 4 of 5 FirstFirst 12345 LastLast
Results 76 to 100 of 102

Thread: PHP 4 or 5?

  1. #76
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's the only reason why I refuse to use HostGator. Everything else is darn near perfect, but I want my PHP 5!

  2. #77
    SitePoint Enthusiast jamiemcd's Avatar
    Join Date
    May 2005
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This thread reminded me that I wanted to go ahead and make the move from PHP4 to PHP5. I have a dedicated server and use CPanel's WebHost Manager. I had always kept version 4 up to date. So I just rebuilt Apache using Web Host Manager and selected PHP 5.1.6. (Just make sure you click Load Previous Configuration before clicking the Start Build button or you will end up with the default settings for PHP which might be different than what you have currently.)

    So far the only problem I had was in my functions.php file (which is included in every page). I had defined a function called stripos because PHP 4 did not have that, but PHP 5 does. So that produced an error and I had to remove that function.

  3. #78
    Non-Member the baldchemist's Avatar
    Join Date
    Oct 2006
    Location
    thailand
    Posts
    141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I agree, I wouldn't be concerned at all using php5. It's the best there is and let your clients know. Our whole business is about developement for the best results for our cients. Dont be scared of telling your clients that in his/her interest and in keeping with developements you are using/ and / or you shoud cahnge to php5.
    Go for it!
    the baldchemist

  4. #79
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I continue to use PHP4 because my own host (from which I do my testing) is still on 4. And quite possibly many of my clients host are on 4 too. And I can not tell my clients to chance host just because I want to program in PHP5. Plus my code is simple enough that I do not need the new features of 5.

  5. #80
    SitePoint Member
    Join Date
    Jun 2003
    Location
    Brazil
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz
    That's the only reason why I refuse to use HostGator. Everything else is darn near perfect, but I want my PHP 5!
    But HostGator has PHP 5, you just have to set it up in your .htaccess file.

  6. #81
    SitePoint Addict bwdow's Avatar
    Join Date
    Feb 2006
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do we use PHP?
    Cause php is easy, cheap, web based and giving more performance.
    Why did they released php 5? What is the difference. Main difference php5 is object oriented. Does it effects our needs? Of course. It maked PHP more complicated, Less easy, more expensive, less web based and less performance. Why did they released a object oriented version. I think Zend is main actor in this issue. They think Zend can develop more products related to an object oriented language and by this way Zend can earn more money.
    I wonder about future of PHP.

  7. #82
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let's think about this here.

    Yes, object oriented programming is a major change from PHP 4 to 5. But there's also (greatly) improved XML support in PHP 5. It doesn't make PHP any more complicated, unless you're used to procedural code. If you're familiar with even JavaScript, then OOP in PHP will be easier to pick up. As for expensive, how much more expensive can it be? It's FREE for crying out loud. You don't pay for it. You just grab it, install it and use it. You can't beat that.

    Less web-based? How? How is it "less Web based" than PHP 4? They both run on a Web server, allowing people to run applications online through their browser. Also, where do you see a performance hit?

    Sounds to me like you have a beef with the Zend group rather than the language itself.

  8. #83
    SitePoint Guru LinhGB's Avatar
    Join Date
    Apr 2004
    Location
    Melbourne, Australia
    Posts
    902
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use both. I have 2 Xen server images - one with PHP4 and one with PHP5. PHP4 (4.4) if I need to use 3rd party apps. PHP5 for my own custom dev.

    The hosts that have both PHP4 and 5 available via a simple checkbox or renaming the PHP5 scripts to .php5 for you are running one as CGI. That's not optimal.

    Wasn't happy with how the PHP devs make it so hard to run both simultaneously. They could've made both running side by side in peace like PHP3->PHP4. Judging by the terribly slow progress of PHP5 adoption, soon we'll have "PHP4 or 6" threads.
    "I disapprove of what I say,
    but I will defend to the death my right to say it."

  9. #84
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hahahahahha

    all i can say to people sticking with php4

  10. #85
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mihd
    hahahahahha

    all i can say to people sticking with php4
    say it to our php 4 satisfied clients

  11. #86
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    id think about the clients who will be likely to use your scripts. would having to find a host that runs php5 be a major obstacle for them? if this is a script they buy, then keep in mind ease of use is often a concern for consumers. they may buy a similar script from someone else instead because it will "just work" with thier current host.

    consider the benefit to your application by using php5. is it a major benefit? will it save you a lot of time? will it offer a worthwhile increased functionality/performance or otherwise "betterness"(for lack of a better term) to your customers?

    dont get me wrong, im all for php5 and id love to see more widespread support for it from hosts. but theres is that reality of how many copies of your script you will sell. you will have to consider the cost/benefit of how far backwards compatible you want to make your scripts.

    if php5 is not going to offer you some significant benefit now, or in the scripts forseable future, id say php4 is the way to go.

  12. #87
    SitePoint Enthusiast CrucialWebHost's Avatar
    Join Date
    Jun 2006
    Location
    Arizona
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz
    Ugh, I don't think so Iceman90.

    Not to sound immature or anything, but that's so .php3
    Why is that a bad idea? That's how, at the moment, it needs to be done. PHP4 needs to default to the .php extension, and PHP5 needs to default to the .php5 extension. Why? Because most scripts out there are made for PHP4, and they aren't always compatible when using it with PHP5.

    And it's really not that big of a deal because if you don't want to use the .php5 extension, just edit your .htaccess file and switch the file types around; or make it so PHP5 works in specific folders.

    I rather have both versions running than one or the other. Some hosts are offering a one-or-the-other deal, but most are doing dual installs and making PHP5 with the .php5 extension.

    PS - I guess I should add why I enjoy PHP5:

    1. XML
    2. mysqli_
    3. OOP

    Hmmm. I know there's more, but it's been long day and, ironically, have been programming all day so my head is a bit clouded. I'll have to add more later Cheers!
    Crucial Web Hosting Our new site is live!
    Introducing Split-Shared and Split-Dedicated
    hosting products! Join our new Developer Network
    and check out the updated Site Showcase!

  13. #88
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would expect the default requirement in today's market is PHP5 and also I would expect the use of the .php extension and nothing else.

    If I were faced with a host using the .php5 (or other) extension, then I would tell them where to go, politely of course

    Another matter to think about people, once PHP6 comes on the market what then? Are we going to have .php for PHP4 - which is still going to be around, .php5 for PHP5 and .php6 for PHP6?

    Come off it...

  14. #89
    SitePoint Member tigglet's Avatar
    Join Date
    Mar 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've had very good luck switching clients from PHP4 to PHP5, mostly because nearly all of my development has been fairly object oriented. For those clients who have applications in PHP4, most of the time, those were applications that were built several years ago and need to be upgraded for security reasons. That's an opportunity to move a client to PHP5.

    For those who think cost of development goes up, I have to say you're right...in the short term. Think about it. You have years of development behind PHP4. Because of this, you have a library of code that does most of the work for you when you're developing a new site. You don't really have an effective code base for PHP5 yet so, yes, development in PHP5 may be a little more time consuming. But I have to say, once you're past that hump, PHP5 is cheaper and easier to maintain than PHP4 was, at least in my case. The more advanced OOP support as well as the other enhancments mentioned by others is very much worth making the switch.

    tigglet

  15. #90
    SitePoint Member
    Join Date
    Nov 2004
    Location
    bhtu
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    several months ago, i asked the internal list when the development support for php 4 will last. the answer is that current php 4.4 will be the last branch in php 4. ze 1 won't go anywhere and it's hard to keep bc within versions.

    the future is php 5 and its successive release. i believe people will move on. i think the main reason why most people are unwilling to move is just because headaches in finding code breaking somewhere after upgrade.

    finally it's about choice, for a better support in the future, upgrade to php 5. pro status quo can stay with php 4 and face the reality that the next release in the branch is just for bug fixes without feature addition.

  16. #91
    SitePoint Evangelist CapitalWebHost's Avatar
    Join Date
    Apr 2003
    Location
    Albany, NY
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As a small host, I can tell you that I will not update to PHP5 till I have a majority of the users asking for it.

    Why? Simple, less headaches. The amount of broken scripts outweighs the value of PHP5 at the moment.

    I may soon offer a PHP5 server for those who want it, but need to justify the costs vs number of clients who want/need it.

    In the meantime,I'm not going to jeopordize the stability of the current users sites by upgrading willy-nilly to PHP5 just because it's the latest and greatest toy.

  17. #92
    I'm NOT an Addict ! TheRock's Avatar
    Join Date
    Jul 2001
    Location
    Earth ... maybe
    Posts
    401
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CapitalWebHost
    I may soon offer a PHP5 server for those who want it, but need to justify the costs vs number of clients who want/need it.

    In the meantime,I'm not going to jeopordize the stability of the current users sites by upgrading willy-nilly to PHP5 just because it's the latest and greatest toy.
    That's a good approach - and I think you've hit the nail.

    It's a tricky situation for developers who want to take advantage of the new features in PHP5 (take the improved XML support, for example, if you're not keen on admiring the new OO model) - they have to keep backward-compatibility with PHP4 if they want a lot of current users to be happy. However, the catch-22 situation is - if they stick to PHP4, users would never push webhosts to migrate to PHP5 any soon.
    -*-
    B-School Forums - GMAT / MBA / Admissions discussions
    -*-

  18. #93
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My host (PowWeb) support both PHP4 and PHP5 - you can choose which you want to default to, but the other is always available through the file extension. Quite handy, although I choose to use PHP5 simply because I'm only developing for my own needs here, I have no clients to support.

  19. #94
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go with PHP5 for the app's nice codes & performance, my skills & good practices, my profession love, and my future ! I've always looked forward.

  20. #95
    SitePoint Addict Iceman90's Avatar
    Join Date
    Mar 2006
    Location
    Calgary, Alberta, Canada
    Posts
    392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz
    That's the only reason why I refuse to use HostGator. Everything else is darn near perfect, but I want my PHP 5!
    I have PHP5 on Host Gator. Request it when you register and they will set it up for you.

  21. #96
    PHP Brainiac dg_den_golotyuk's Avatar
    Join Date
    Jul 2006
    Location
    Kiev, Ukraine
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it is a widespread that both PHP4 and PHP5 installed on hostings. Of course PHP5 is cooler, cause of OOP better support, but PHP4 has huge codebase already written in it
    DG [Den Golotyuk], Lead Developer
    Chestnut Software
    Avoid web outsourcing scams!
    Click here
    for a free downloadable report

  22. #97
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm just afraid that some of my customers who use some script not compatible with PHP5 will complain.

  23. #98
    SitePoint Enthusiast
    Join Date
    Oct 2006
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    some are still using old scripts that aren't working with php5, this gives hosting companies a warning to keep those customers with old scripts in mind

    but some other companies offer both php4 and php5 and you select what's suitable for you

  24. #99
    SitePoint Enthusiast jnicol's Avatar
    Join Date
    Jul 2006
    Location
    Melbourne, Australia
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP4 is obviously eventually going to be phased out, so my thought would be wherever possible when you start a new PHP project to work with PHP5. Continuing to write code that is going to break in PHP5 is only going to come back and bite you eventually.

    If you have to use legacy scripts that run only in PHP4 - fine, do what you gotta do, but it is only a matter of time before you are going to have to rewrite that code...

    Choose a forward thinking host that supports PHP5 as well as PHP4. If your client has already got a host and they only run PHP4, tell them they have to switch hosts. I haven't had a client yet who wasn't happy to follow my advise where the choice of web host was concerned.

    Also some posts in this thread suggest that you *have* to write OO code in PHP5, but you can continue to write procedural code if you wish.

  25. #100
    Non-Member DelvarWorld's Avatar
    Join Date
    Jul 2004
    Location
    Baloney
    Posts
    341
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I do know that most forum software is built on PHP 4, and I know that for example phpBB will stop providing support if you switch to PHP 5 because they haven't done any testing on it yet.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •