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 1 of 5 12345 LastLast
Results 1 to 25 of 102

Thread: PHP 4 or 5?

  1. #1
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    PHP 4 or 5?

    It seems to be that most hosting service providers still tend to keep PHP 4 on their servers. Are they led by backward compatibility concerns, it doesn't matter really. But it's a real headache for a developer when he/she is forced to develop on PHP 4 while the fifth version would bring the application to a whole new level (in the developers point of view).

    But it also seems to be that more and more hosting service start providing PHP 5 as well. So now my concern is which would I choose as a developer? If I was going to develop a product, would I choose PHP 4 because it's used on majority of servers, or PHP 5 which is coming inevitably but may cause a loss of potential clients who still use PHP 4?

    What are your thoughts about it? What would you choose?
    Saul

  2. #2
    SitePoint Evangelist
    Join Date
    Mar 2005
    Posts
    421
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its a tricky situation, but i tend to believe that peoples consistent attempts to write backwards compatible code for php4 hosts is one of the main contributors to the inertia of adopting php5. At some point peoples heads need to start facing forwards instead of backwards, and with php 6 on the horizon, i'd say the time is now.

    I say this as i'm tied into a php4 situation and i'm desperate to play with php5 on a commercial basis.

  3. #3
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yes, I'm in the same situation. On one hand you have to look at the user needs and PHP 4 is one of them. On the other hand you have to educate your users as well, so introducing PHP 5 to your applications is one way to do it.

    But the situation is very difficult, nobody wants to hurt their business.
    Saul

  4. #4
    SitePoint Addict
    Join Date
    Aug 2005
    Location
    Lithuania, Europe
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would not pay attention to PHP 4. You are sure to find enough hosts which support PHP 5 (if not by default, then by request for sure). I have switched to 5 and never looked back. I don't really see a problem here.

  5. #5
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    My host has both installed and it's a great help.

  6. #6
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ReeD
    I would not pay attention to PHP 4. You are sure to find enough hosts which support PHP 5 (if not by default, then by request for sure). I have switched to 5 and never looked back. I don't really see a problem here.
    I'm not talking about myself needing to install PHP 5. I'm talking about my potential clients, whether they are able to switch to PHP 5. My concern is that PHP 4 is still too popular and not all hosts are willing to change it. Loosing buyers is my biggest concern.
    Saul

  7. #7
    SitePoint Addict
    Join Date
    Dec 2004
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I would be better to develop and support the product for both versions for a while. I think to have it in PHP 4 only could make the product look outdated for some users.

  8. #8
    SitePoint Wizard holmescreek's Avatar
    Join Date
    Mar 2001
    Location
    Northwest Florida
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking

    Another issue is we tend to think in PHP 4 or PHP 5 and forget about PHP 5 build x.x.z

    A good hosting company will have PHP5 installed, and most imporantly, if something does go a little goofy, 24/7 tech support via phone (and they actually answer in a couple of minutes) is invaluable.

    One solution that I found to deal with the issue, is get a dedicated server or reseller account with a good hosting company and REQUIRE that your clients host with you, as you are there developer. So...

    1) If your server has PHP 5, and all your clients are on your server, then you don't have to worry about 4 vs 5.

    2) You don't have some client calling you in the middle of the night complaining about the mail server being down and they are hosted on xyz company, instead of your server.

    3) You don't have to worry about someone else stealing your code, popping a trademark on it, and selling it out from under you. This is where a good contract comes into play stating that the client ownes the design, but not the programming code.

    4) Pick your customers wisely, have a good legal contract, provide good service and you don't have to worry about 2 and 3 above.
    intragenesis, llc professional web & graphic design

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2006
    Location
    Poland
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Uhh, it's good to have all the control over what software is installed on the server. Now I have php 5.1.6, postgresql 8.1.4, python 2.5 etc. along with php4 for some older stuff. At least I'm sure I won't work with php4 for the next 6 months. Pretty refreshing I would say.

  10. #10
    is_empty(2); foofoonet's Avatar
    Join Date
    Mar 2006
    Posts
    1,000
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I moved to PHP5 as soon as there was a stable version out, it was "bite the bullet time" for running a dedicated server anyway, so was a much easier decision.
    Upgrading to Mysql 5? Auto-increment fields now strict
    use NULL
    Or zero or leave the field name out completely.

  11. #11
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use php5 and don't look back. The more developers behind php5 the better, because it will push hosts to upgrade. Most of the major hosts have already upgraded already or at least offer both, so it's not really too much of an issue anymore. The push needs to come from developers - If they don't run php5, they can't run your software. You may loose customers initially, but most people will upgrade or switch hsots for a good piece of software. It's go time.

  12. #12
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all your replies.

    There are two reasons that hold me back from quiting PHP 4:
    • The user's point of view - the application should be of a maximal compliance with user needs. If there's even a slight possibility that some users can't use PHP 5, I should provide a support for PHP 4 as well.
    • The business' point of view - every single client is worth gold and I cannot loose a single one.

    Finally, what difference it makes to me as a developer is the extra work I should do to make it compatible with PHP 4. So I guess it's up to what is more valuable to me -- my time or my clients? Right now I really tend to stay with the latter.
    Saul

  13. #13
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by php_daemon
    The business' point of view - every single client is worth gold and I cannot loose a single one.
    You really can't expect to satisfy every customers needs. You have to draw a line somewhere. In order to be competitive, you need to focus your competence. That will mean that you have to turn some clients down, but it will also mean that you can serve the remaining ones better.

  14. #14
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken
    You really can't expect to satisfy every customers needs. You have to draw a line somewhere. In order to be competitive, you need to focus your competence. That will mean that you have to turn some clients down, but it will also mean that you can serve the remaining ones better.
    Well, actually I think I'd serve them better if I supported PHP 4. I can recommend using PHP 5, but it's up to them whether they do it or not.
    Saul

  15. #15
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php 4 to give my clients stability and reliabity

  16. #16
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,561
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use PHP 5 whenever possible. PHP4 is a choice only when client specifically insists for this.

  17. #17
    SitePoint Guru dbevfat's Avatar
    Join Date
    Dec 2004
    Location
    ljubljana, slovenia
    Posts
    684
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Skyblaze
    php 4 to give my clients stability and reliabity
    you could hardly call php5 unstable and unreliable. If anything, it's the other way round.

  18. #18
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,458
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kyberfabrikken
    You really can't expect to satisfy every customers needs. You have to draw a line somewhere. In order to be competitive, you need to focus your competence. That will mean that you have to turn some clients down, but it will also mean that you can serve the remaining ones better.
    I totally agree here!

    I prefer PHP5

  19. #19
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its very easy to run php4, php5, perl and ruby with lighttpd at same time

    i mean very easy!

    but then again alot of people are being held back by plesk and cpanel

  20. #20
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mihd
    its very easy to run php4, php5, perl and ruby with lighttpd at same time

    i mean very easy!

    but then again alot of people are being held back by plesk and cpanel
    Exactly. Most of the people don't have the control over their server configuration. And it's all up to hosting service providers, whether they decide to provide PHP 5 or not. At this point, it's also up to you, whether you let them to take away your clients.
    Saul

  21. #21
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I was building software for mass distribution for unknown customers I'd try to support PHP4 if it wasn't a major draw back in terms of development.

    Whenever building a custom app I'd try to work on the customer side of things (hosting) to be able to use PHP5.

    If I was building an app to be widely, and freely distributed I'd force PHP5 from an ideological POV to try and force the world to move foward (delusions of grandure here). If it's being given away I have nothing to loose by dropping PHP4 support.

    Maybe the PHP community needs to come up with a PHP5 only killer app that every $3/month shared web host will want, in order to try and force their hand?
    Maybe cPanel should fix their software so custom php.inis can work with PHP5
    mikehealy.com.au
    diigital.com art, design . Latest WorkSaturday Morning

  22. #22
    SitePoint Addict frankiehots's Avatar
    Join Date
    Jan 2002
    Location
    U.S.A. *Blue State*
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am also lucky to be using a host (Dreamhost) for a lot of my work that gives the option of using PHP 4 or 5. One really nice thing in PHP 5 are the Simple XML functions. Way, way better than any options for handling XML in PHP 4. The only case where I have opted to still use PHP 4 is when there are older applications on a site and they get broken with PHP 5 because the host has register_long_arrays set to off. Of course this only matters for shared hosting environments where you can't edit the php.ini.

  23. #23
    SitePoint Addict SRTech's Avatar
    Join Date
    Mar 2005
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think hosts have come up with an easy way to allow the user to switch between 4 & 5 as all the larger hosts seem to offer an option as to which you want to use, sometimes on a domain by domain basis (for multiple domain hosting plans).

  24. #24
    SitePoint Enthusiast GzThai's Avatar
    Join Date
    Sep 2006
    Location
    USA
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    php 4 stability and reliabity

  25. #25
    Web developer Carl's Avatar
    Join Date
    Sep 2003
    Location
    sweden
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Like I said before. Most hosting companies do not upgrade to PHP5 because they have a dependancy on some type of control panel that does not support PHP5 or allow PHP4 and PHP5 to run together. Those that build their own CP or modify a commercial CP have PHP5 and PHP4


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
  •