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 2 of 4 FirstFirst 1234 LastLast
Results 26 to 50 of 83
  1. #26
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,495
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mihd hit the nail right on the head

  2. #27
    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)
    It's been a while since I wrote any PHP4 code. If I had to deal with a legacy script, I think I would seriously consider porting it to PHP5. It's a lot easier than one might think.

  3. #28
    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)
    When is PHP 6 out? That will be another compatibility nightmare... but supposedly the last one.

  4. #29
    SitePoint Zealot
    Join Date
    Nov 2005
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My localhost runs PHP5.2, but I never use any PHP5 only anything, next project though, seriously considering using Zend Framework or sympfony and actually taking advantage of PHP5 objects. And I am sending some of my PHP 4 books to the recycling center.

    Seriously, I hope they give PHP6 some quality brain time, I mean make sure they get everything right.

    Edit: Checkout the free chapter about PHP object design patterns http://www.apress.com/book/supplemen...D=358&sID=2401
    Last edited by abb; Jul 6, 2007 at 06:13.

  5. #30
    Beer drinker Srirangan's Avatar
    Join Date
    Jan 2005
    Location
    Beerland!
    Posts
    776
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Personally and at work, we are very much pro PHP5. But realistically until the web hosts do a mass migrate, we can't and I will continue to code for PHP4.

    What's however positive is that all major open source apps like Joomla, Drupal, WordPress etc. have together resolved to migrate their s/w to PHP5 by Feb 2008. It is I think known as the GoPHP5 Resolution.

    ---

    [development] PHP5 going forward
    Ken Rickard agentrickard at gmail.com
    Wed May 23 01:17:39 UTC 2007

    * Previous message: [development] Per content type comment moderation settings
    * Next message: [development] PHP5 going forward
    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    All-

    I received a private note from Larry Garfield this morning based on
    something I posted online, so it's time to make it more public.

    Jonah Braun, who is on Joomla's security team and the 1,5 core team works in
    my office. When I came back from DrupalCON, I toid him that Rasmus had
    asked Drupal to drop support for PHP4. Jonah immediately took to the idea,
    and here's what he saw as the challenges.

    Two problems with dropping PHP4 support:

    1) Many hosts (including mine) only support 4.x
    2) If one project (Drupal) drops it but the other doesn't (Joomla), the
    audience (both developers and users) may abandon the project that drops
    PHP4.

    Jonah's modest proposal: An agreement to set a release version (or date)
    where major PHP-based projects drop PHP4 support.

    Larry, always ambitious, suggested that we get WordPress and Galley
    involved, too.

    I can very clearly see the advantage to projects setting an arbitrary date
    (say, January 1, 2008) after which we don't officially support PHP4. THis
    wouldn't say that we try to break PHP4, simply that new feature development
    (and patch support and security updates) require PHP 5.

    So consider this a modest proposal to get folks thinking about how to move
    forward together. I already passed Larry on to Jonah to see who might make
    that decision on the Joomla side.

    - Ken Rickard
    agentrickard
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.drupal.org/pipermail/de...attachment.htm

    * Previous message: [development] Per content type comment moderation settings
    * Next message: [development] PHP5 going forward
    * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    More information about the development mailing list
    Online Startups Insight for new entrepreneurs

  6. #31
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mihd View Post
    developers mostly love and want php5, better object oriented support is a major plus

    the problem is Cpanel and Plesk, these are the bread and butter of the hosting industry...
    Yes, but most php "users" are not "developers" in a real sense. I'm wondering how many of phpBB/typo3/nuke operators even know that there are different versions of php.

  7. #32
    The Jellophonic Autobrain CHeeSeBLiND's Avatar
    Join Date
    Jul 2001
    Location
    Bolton, England
    Posts
    584
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I write all my own sites in PHP5. If only for the ability to autoload classes.

    Unfortunately nearly all the work I do for clients is PHP4 due to the fact they're scared to upgrade their servers and all that jazz.
    hmm...

  8. #33
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeanco View Post
    Just to let anyone know:

    If you want to ensure that your functions will still work in PHP5, the answer is in the error_reporting() you set
    Why do you get an error if you define a variable with the name this in PHP 5? Is that allowed in PHP 4?

    You get a hint from (the introduction of ) this post:

    A soft introduction to object oriented programming.

  9. #34
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz View Post
    I'm stuck on servers that only run PHP 4. I WANT to use (and learn) PHP 5, but the only one I have access to is my local development environment that was set up on my desktop PC using XAMPP.
    PHP 5.2.3 Released. I think there are Norwegian hosters supporting PHP 5.2.3. There are cheap Danish hosters supporting PHP 5.2.2 and may be 5.2.3.

    Ask if they have installed the XSLT Processor etc. That is important if you suppy you documents from one source using XML.

    Some books are already prepared for PHP 6.0 like Robert Richards (2006): "Pro PHP XML and web services."

    Note that he has written some DOM Exstensions for PHP 5, and also contributed to XML Reader, XML Writer extensions and to the libxml2 library etc., so he should know what he is talking about.

  10. #35
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mihd View Post
    php5 only for last 2 years, php5 is just waaayy better from a programming point of view, tho there are few things left desired such as namespaces.

    i also avoid apache specific functions and rewrites (because apache sucks compared to lighttpd / nginx )
    You can block IP (range)'s in .htaccess. That is on a lower level than in a php configuring file / script. I prefer .htaccess to those jobs on my phpBB powered forum.

  11. #36
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mihd View Post
    php5 only for last 2 years, php5 is just waaayy better from a programming point of view, tho there are few things left desired such as namespaces.

    i also avoid apache specific functions and rewrites (because apache sucks compared to lighttpd / nginx )
    I think namespaces will be implemented in PHP 6.0 and you can go around it and define your own:

    Google KW Search:

    namespaces php kgun site:www.webproworld.com

  12. #37
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    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.
    PHP6 - Direction of PHP

    A PHP 6 overview

    Features coming in PHP 6.0

    Note 5.6 name spaces

  13. #38
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What small amount of PHP code that I do write are simple scripts for clients. So I stick to PHP 4 since I don't have the need for OOP features of 5. That way my code works regardless if the client is on PHP4 or PHP5.

  14. #39
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As long as you do not use PHP 5.x (and later 6.x) reserved words and do not need OO it should be OK. But who knows, the devil is in the details.

    There may be unknown boundary conditions.

    Example:
    The difference between the = and the == operator in C (and C inspired languages like PHP, Perl, C++, C#, Java etc.)

    I once copied code from a C++ book that used = when == should be used. The program will run in most cases so you do not get a compilation error.

  15. #40
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We still stay with PHP4 now because most of the hostings we are staying with only support PHP4. Some opensources or business scriptings seem not ready for PHP5 either.

  16. #41
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The push on this one has to come from the developers. I develop exclusively in PHP5, and revert to PHP4 code only when absolutely required by an existing system. I won't develop any new systems or projects in PHP4 because it doesn't make any sense to develop using a language that is already out of date - that's like developing windows applications targeting XP when Vista is already out. If the client's host doesn't support PHP5, I very strongly advise them to change hosts or move hosting to my own server. Any host that does not offer PHP5 support when it's been out for around 2 years is not a good host to use. The more people who strongly push for PHP5, the better. - there are plenty of hosts out there that support both PHP versions if your client needs them.

  17. #42
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Note:
    PHP above version 5.0 is developing into a true OOP language.

    PHP 4.x and lower is a server side scripting language without OO functionality.

    You can write a simple CMS system without using OO functionality in PHP driven by MySQL without using OO.

    You can write an even simpler CMS system using PHP and XML.

  18. #43
    SitePoint Addict
    Join Date
    Sep 2006
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can block IP (range)'s in .htaccess. That is on a lower level than in a php configuring file / script. I prefer .htaccess to those jobs on my phpBB powered forum.
    so? you can block ips (and more) with lighttpd as well...

    or if you want go to an even lower level and use iptables

  19. #44
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One reason I use .htaccess, is that I configure my site there and not in php.ini.

    And it is extremely fast to block / unblock IP (range)'s in .htaccess.

    # them out and they are unblocked. Delete # and they are blocked again.

    In addition, on my forum, I use the excellent tool Starfoxtj

    By sorting on various criteria, descending join date, only rigistering without confirming, I can delete 100's of useres in a few seconds.

    I think a lot of problems could have been avoided if people knew when to use software that follows with the server and when to use server scripting.

    Is there anything closer to a web server than the servers own configuring file(s)?

  20. #45
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you want to how many php5 was used.
    It's best to ask host.
    I can talk that it's about 15%
    I highly recommend
    reliable web hosting

  21. #46
    SitePoint Addict
    Join Date
    Nov 2005
    Location
    Moss, Norway.
    Posts
    283
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by marblehost View Post
    If you want to how many php5 was used.
    It's best to ask host.
    I can talk that it's about 15%
    Question.

    Note the folowing cite from a Site point book:

    "XSLT support in PHP is provided by the optional XSL extension : http://www.php.net/xsl

    This extension isn't enabled by default: So you'll need to compile it in using

    --with-xsl

    on Unix style installations. You'll need to install libxslt:

    http://xmlsoft.org/XSLT/

    on your server before you can do this.

    On, Windows the process is a bit easier: You simply need to add the php_xsl.dll file to your php.ini file on Windows."

    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.

  22. #47
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Php6

  23. #48
    SitePoint Enthusiast dakine's Avatar
    Join Date
    Dec 2006
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I write for both as I have a hand full of servers still running PHP4 and a the rest on PHP5, I prefer to work on 5 though because of its better OO support.

  24. #49
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using a server that only supports PHP 4 and so far I haven't had a need to use PHP 5 so I just continue to use 4. Still, most of the stuff I write is simple enough that it doesn't require the new features of PHP 5.

  25. #50
    SitePoint Zealot imagize's Avatar
    Join Date
    Oct 2004
    Location
    Australia
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I write PHP5 exclusively for new projects. I only deal with php4 when maintaining old applications.

    I will definitely be supporting the 'GoPHP5' movement. PHP5 addresses so many of PHP4's shortcomings and it's been 3 years and still we have no wide-spread adoption.

    It's nice to see the open source big guns getting behind this but I think the likes of PHPBB, vbulletin and Invision Power need to jump in as well to really nail this in. Unfortunately I can't see that happening; the likes of vBulletin and IPB are in business and from their point of view it will be 'If it aint broke don't fix it'.

    PHP6 is on our doorstep, so it's about time the php community pulls their finger out and adopts. Eventually they could just stop releasing security fixes for PHP4, that would make people shift quick smart. That wouldn't be very nice though


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
  •