SitePoint Sponsor

User Tag List

View Poll Results: What is your level of support for PHP 5?

Voters
140. You may not vote on this poll
  • I only write PHP 5 compatible code. I use PHP 4 only on PHP 4 servers.

    107 76.43%
  • I attempt to make my code compatible with PHP 4 whenever possible.

    19 13.57%
  • I only try to write PHP 4 code.

    14 10.00%
Page 3 of 4 FirstFirst 1234 LastLast
Results 51 to 75 of 83
  1. #51
    SitePoint Enthusiast CrucialWebHost's Avatar
    Join Date
    Jun 2006
    Location
    Arizona
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP5 only here, because that's all we install on our servers. A lot of the features I use are just not available in PHP4.
    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!

  2. #52
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really want to use only and only PHP5 but I don't have my own server and have to depend on other's server and client's server. So I prefer and code in PHP5 if the server has PHP5 otherwise I always have to go for PHP4.

    But with OOP in PHP5, I really enjoy to work with PHP5.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  3. #53
    Team SitePoint andrew.k's Avatar
    Join Date
    Nov 2006
    Location
    Melbourne, Australia
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP4 is dead to me.
    I spent long enough stuck in PHP4 to know I'll never write PHP4 code again.
    Andrew Krespanis
    SitePoint Code Monkey

  4. #54
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Location
    Russia, Tambov
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my projects I prepare to publish in next two-five weeks - php5 only.

    But sometimes there are clients who has site working only in PHP 4.

    So the question is strange.

  5. #55
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kgun View Post
    Question.

    Have you installed the XSLT processor on your webservers? In my view, that should be done on every serious web server supporting PHP in 2007.
    Yes,you are right.PHP website is very important market for any host.
    So we installed the XSLT processor on our webservers.
    I highly recommend
    reliable web hosting

  6. #56
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    2 years ago I decided it was the right time to start learning OOP, so moved to PHP5 then. Had to get a dedicated server to run it on.

    I don't think I would ever look back to working on PHP4 now, I know OOP works on PHP4, but lacks too many basic features that I have got used to (and ohh, those dreaded & all over the place, please ...). Things like simpleXML and Xslt, and as previously said, PDO ... fab.

    If it was some well-paid non-OOP work I guess I'd think about it.

    This is an interesting thread. I chose to use CodeIgnitor for some projects as it seemed the simplest and best documented framework at the time, and their site makes a lot of PHP4 BC ... although it certainly works very nicely with PHP5.

    I am likely going to try out the Zend framework next though.

  7. #57
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    I use versions 4 & 5 on different servers - If starting a new application though I write PHP5 only.

    Though, we have a testing server setup to test our applications under the new PHP6 settings.

    Always looking to the future

  8. #58
    SitePoint Member Don Wilson's Avatar
    Join Date
    Sep 2004
    Location
    Dallas
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since my code is server-proprietary, I require every server that I work on to be installed with the latest PHP 5.2 release. I plan on working on more publicly distributed software, which means I'll need to learn to work with PHP 4 more.

  9. #59
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stymiee View Post
    All of my code is written in PHP 5 without concern for PHP 4 compatibility. I only write PHP 4 friendly code when I know the code will be run on a server that is only running PHP 4. What are you doing?
    PHP5 code always. PHP4 code with PHP5 support when required.

    There is a big difference , PHP4 can be used in PHP5, but not the opposit.
    PHP Code:
    <?php
    class Foo {
        public 
    $bar 'bas';
    }
    ?>
    That's php5 only, but however

    PHP Code:
    <?php
    class Foo {
        var 
    $bar 'bas';
    }
    ?>
    Is compatible with both versions. However this is not allowed in E_STRICT mode, which any serious developer should be developing under.

    If there is any chance at all that the client would wish to have php4 support, I'll use the second approach, because.. it works in php5.

    Then i'll use function_exists() and similiar to create php4 wrappers for otherwise php5 methods. Thus the code is easily upgradeable.

  10. #60
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Hong Kong
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've moved on to writing PHP5 code exclusively since start of 2007...

  11. #61
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This PHP 4 vs PHP 5 and support for XML extensions post that I posted in the XML sub forum may be of interest if you use the libxml extensions library with PHP.

  12. #62
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP5, unless 4 is necessary. Pretty much what most people here are saying goes for me as well.
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn


  13. #63
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think PHP 5 is good enough ... many major hosting now support 5 too~~ but I will always make my code PHP 4 friendly

  14. #64
    SitePoint Zealot
    Join Date
    Aug 2005
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We're PHP4 here. PHP 5 Will come when its time for a second server. We bought our server about 1.5-2 yrs ago...but we had/have client sites that were written all the way back in 2000, 2 of them being rather large applications...and though we've never tested them in a 5 environment, we simply didn't and don't have the time to fix them. (cost/benifit analysis)

    I would like to work in PHP5...and since our server is dedicated and I manage most of it, switching to 5 itself would not be difficult, but we have a stupid amount of work as it is, and trying to add in upgrading the existing code base on multiple sites is just not feasible.

    I fail to understand why the folks at php haven't made a simpler solution to multiple versions. It makes sense in the environment that the software is working in, to provide a way to have php4 AND php5 installed and running seamlessly (no cgi/apache/whatever mess) that could be as simple as setting a var in the htaccess to tell it which interpreter to use. If anything would promote the rapid acceleration of the growth of 5 and future versions, that would be it.

    Frankly, alot of the blame lies in php itself too. php5 was a disaster. The amount of bugs and problems it had at 5.0 made most hosting companies associate php5 with negativity. So, even though 5.2+ is very stable and good, it's still php5...they would have done good to just call it 6, I think more hosts would have been willing to upgrade at that point...php5 just has a bad name in the eyes of most hosts.

  15. #65
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by carson1185 View Post
    but I will always make my code PHP 4 friendly
    Always? Will your PHP8 code be PHP4 friendly as well?
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn


  16. #66
    SitePoint Enthusiast SecondV's Avatar
    Join Date
    Jan 2006
    Location
    Kentucky
    Posts
    73
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stymiee View Post
    I was curious as to how many of us are actually writing PHP 5 code nowadays. After reading that most of the major free/open source PHP script producers will be only officially supporting PHP 5.2+ as of February of next year I was wondering where that puts the rest of us in terms of support for it.

    All of my code is written in PHP 5 without concern for PHP 4 compatibility. I only write PHP 4 friendly code when I know the code will be run on a server that is only running PHP 4. What are you doing?
    Funny I should see this thread, I thought about making it myself. My project has joined those at www.gophp5.org

    www.domainportfolio.us/gophp5.html

  17. #67
    SitePoint Wizard gold trophysilver trophybronze trophy dc dalton's Avatar
    Join Date
    Nov 2004
    Location
    Right behind you, watching, always watching.
    Posts
    5,431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ONLY write PHP 5.0 (or better) code ........ from my point of view anything less is garbage!

    PHP 5 has finally shown the world that PHP is a real language and worthy of it's place on the web ...... I can't wait until PP 6.0 is out, from what I've seen PHP 6.0 is finally going to weed out the 2nd rate hacks that really don't have clue one about development with it!

    Congrats to the people behind PHP!

  18. #68
    SitePoint Addict
    Join Date
    Sep 2002
    Posts
    225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    About 5 months ago, when I decided to start future projects with the Symfony framework instead of my home-grown one, was when I officially abandoned PHP 4 compatibility.
    Unfortunately, where I work there are several servers that I do not control that have PHP 4 and will probably never see the light of PHP 5. I decided a long time ago that I needed to learn a framework and I REALLY wanted to use Symfony but since my hands were tied to PHP 4 I had to learn CakePHP.

    Fortunately, REL 5 has PHP 5 installed on it and is supported now by RedHat hopefully my company will start to move towards PHP 5, but I highly doubt it.

    I can't tell you how frustrating it is to continue to have to write OOP in PHP 4. When I can I write PHP 5 as that is the future and much nicer that PHP 4.

  19. #69
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rjm1982 View Post
    We're PHP4 here. PHP 5 Will come when its time for a second server. We bought our server about 1.5-2 yrs ago...but we had/have client sites that were written all the way back in 2000, 2 of them being rather large applications...and though we've never tested them in a 5 environment, we simply didn't and don't have the time to fix them. (cost/benifit analysis)
    My bolding. As an economist I will say that that is a very important view, but there is also an optimal stopping time, a time to upgrade both hardware and software. It is not always optimal from an economic point of you to be in the front of the technological evolution. There are a lot of hosters offering the full range of the latest PHP versions, PHP 4.x and above. A maximal solution seldom maximizes profit. An optimal does. The time element is very important. The problem is to find the optimal time to invest.

    Scroll down to "The optimal time to invest when the price processes are geometric Brownian motions."

    Prices often follow such a process.

    See my first post in this thread, that I mean is important.

    Many Web 2.0 site will be driven by XML technoligies, not least AJAX web application sites. See KjellBleivik in my signature for more information related to Web 2.0.

    There is no need to reinvent the wheel and for those developing serious XML powered web 2.0 sites, the libxml library is very important. Libxml2 requires PHP 5.x. There is a race between the developement of libxml and PHP and it is very important to write upgradeable code.

    Read more in this

    Problem with XML in CDATA tag (swf related) especially my post dated Jul 11, 2007, 14:28

    thread.

  20. #70
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dc dalton View Post
    from what I've seen PHP 6.0 is finally going to weed out the 2nd rate hacks that really don't have clue one about development with it!
    The ability to pick up PHP without having "clue one" about development was a fantastic thing for me. I learned PHP pretty much on the job, with little knowledge of the development world.

    I'll admit that much of what I wrote was sub-par at first, but I learn by doing and I'm not so great at class instruction or books. Now, I know a little better, my code is more refined and I'm working with OOP and other more "standard" practices.

    I don't consider myself much of a developer, but I don't want to be one either. I just want to be self-reliant when working on my own projects.
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn


  21. #71
    Web developer Carl's Avatar
    Join Date
    Sep 2003
    Location
    sweden
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am a 90&#37; Drupal developer since about a year ago. We develop for a PHP4 web host and have PHP4 on the dev server. But I always run and test the other developers code locally on PHP 5.2. So far no one has written any thing truly PHP4 only. I think part of the reason is that Drupal is mostly PHP5 compatible.

    But I keep pushing and pushing the management to move to a PHP5 webhosting service because the present one only guarantees support for PHP4 under RedHat.

  22. #72
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    PHP today announced that as of the end of this year, PHP 4 will be discontinued. Security updates will be available until August 2008, but no more releases after 31st December 2007.

  23. #73
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    That's one way to help things along.

  24. #74
    SitePoint Wizard mcsolas's Avatar
    Join Date
    Jul 2004
    Location
    Hermosa Costa Rica
    Posts
    1,707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stormrider View Post
    When is PHP 6 out? That will be another compatibility nightmare... but supposedly the last one.
    I almost feel bad for the php guys after seemlessly going from coldfusion 5 to 6 to 7 and eagerly await the release of cf 8 .. knowing that it wont involve any changes to the code I already wrote. Oh the wonders of using a mature application server language.

  25. #75
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mcsolas View Post
    I almost feel bad for the php guys after seemlessly going from coldfusion 5 to 6 to 7 and eagerly await the release of cf 8 .. knowing that it wont involve any changes to the code I already wrote. Oh the wonders of using a mature application server language.
    Do you really want to bait us to have the shortcomings of Cold Fusion being spelt out?
    Online Startups Insight for new entrepreneurs


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
  •