SitePoint Sponsor

User Tag List

Results 1 to 21 of 21
  1. #1
    SitePoint Zealot Jafar's Avatar
    Join Date
    Jun 2005
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Do you consider PHP 4 while developing new apps?

    Should my web app be compatible with PHP 4? You know there are some big OO differences and database stuff.

    What's your idea? When PHP4 and IE6 can say goodbye!?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only reason to even think about php4 is if you have inherited a legacy app that won't run on 5.

    There is a massive difference between php and ie: with php you have control of the version, with ie the user does.

    Basically: support ie6 as long as it is financially beneficial to do so; support php4 as long as you are getting paid to do so.

  3. #3
    SitePoint Zealot Jafar's Avatar
    Join Date
    Jun 2005
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I mentioned ie here just for joking. My question is just about PHP and the current servers support for php5.
    Last edited by Jafar; Mar 7, 2010 at 02:48. Reason: typo

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I...started developing for 5.3 and up exclusively. Symphony has gone the same route with version 2 of there framework. For me version portability is the crutch of legacy cruft that I want no part of.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not me, I am still not using 5.3 as minimal requirement, but I do have 5.2 as my min required version
    My project: Open source Q&A
    (similar to StackOverflow)
    powered by php+MongoDB
    Source on github, collaborators welcome!

  6. #6
    SitePoint Evangelist AlienDev's Avatar
    Join Date
    Feb 2007
    Location
    UK
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I won't touch anything below 5.2.
    Me on StackOverflow | Blog & personal website.

    I mostly use: PHP, Java, JavaScript, Android.

  7. #7
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Absolutely not, PHP4 is broken and will never be fixed.

  8. #8
    SitePoint Member
    Join Date
    Mar 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there are some plugins can fix it and library file also available

  9. #9
    SitePoint Evangelist AlienDev's Avatar
    Join Date
    Feb 2007
    Location
    UK
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by yourlips View Post
    there are some plugins can fix it and library file also available
    Just: no.
    Me on StackOverflow | Blog & personal website.

    I mostly use: PHP, Java, JavaScript, Android.

  10. #10
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If a client already had PHP4 hosting and I was doing minimal programming, like a contact form then I'd support it, but for anything else, no.

    I'd like to start with PHP 5.3, mostly for namespaces, but for me that would be a bit limiting regarding hosting.
    Logic Earth - do you have 5.3 host recommendations?

  11. #11
    SitePoint Zealot Jafar's Avatar
    Join Date
    Jun 2005
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, NO is the right answer!

  12. #12
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    A poll would have been more effective :P

    I'd say about 10% of PHP developers bother with PHP 4 at current times. I still see a fair few people around the forums mentioning that their system is PHP4 or that they haven't even personally made the jump from 4 to 5.

    Me however - I can't think of a realistic situation where PHP 4 is required. Servers can be upgraded and old software can be routed to PHP 4 if required.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  13. #13
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,863
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    PHP 4 is long dead and has a growing number of security holes in it that will never be plugged. There is no reason for doing any further development for it since anyone who has been asleep for the last couple of years and therefore missed its death can be advised to upgrade to a current versipn of PHP. Properly written scripts for PHP 4 will still work on PHP 5 so it is only if they are still using scripts intended for PHP 3 that they would have problems with the upgrade.

    The question of whether to support old versions of software should only really arise in between the release of the replacement version and the death of the old version. So the question of whether to support PHP 4 was only really something that different people should have been making their own different decisions on would have been between the introduction of PHP 5 and the death of PHP 4 in 2008. There was plenty of time in between the introduction of PHP 4 and its death in 2008 to make any changes to code to upgrade from PHP 3 to change the things that PHP 3 supported and PHP 5 doesn't (which were all flagged as deprecated in PHP 4 so you'd know that they were being removed).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  14. #14
    SitePoint Zealot Jafar's Avatar
    Join Date
    Jun 2005
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was checking db class of wordpress and discovered they somehow considered php4 compatibility

    Code PHP:
    /**
    	 * Connects to the database server and selects a database
    	 *
    	 * PHP4 compatibility layer for calling the PHP5 constructor.
    	 *
    	 * @uses wpdb::__construct() Passes parameters and returns result
    	 * @since 0.71
    	 *
    	 * @param string $dbuser MySQL database user
    	 * @param string $dbpassword MySQL database password
    	 * @param string $dbname MySQL database name
    	 * @param string $dbhost MySQL database host
    	 */
    	function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
    		return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost);
    	}
     
    	/**
    	 * Connects to the database server and selects a database
    	 *
    	 * PHP5 style constructor for compatibility with PHP5. Does
    	 * the actual setting up of the class properties and connection
    	 * to the database.
    	 *
    	 * @since 2.0.8
    	 *
    	 * @param string $dbuser MySQL database user
    	 * @param string $dbpassword MySQL database password
    	 * @param string $dbname MySQL database name
    	 * @param string $dbhost MySQL database host
    	 */
    	function __construct($dbuser, $dbpassword, $dbname, $dbhost) {
    		register_shutdown_function(array(&$this, "__destruct"));
     
    		if ( WP_DEBUG )
    			$this->show_errors();
     
    .....

    are they right? of course it's a personal decision

  15. #15
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is most likely backwards compatibility. If you're starting a new project then it's irrelevant.

  16. #16
    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)
    At least for me, this is all dependent on the client if you do not have own server to deploy the site for your client. So if the client has server having PHP4 then one must be compelled to work for PHP even though we can suggest/recommend the client to go for PHP5 with lots of features. I have still one client who does not have the server upgraded to PHP5 because some websites are running with huge number files written in traditional PHP4 and I am also compelled to write codes for PHP4 which is also really panic for me in this era of OOP because I have PHP 5.3 in my local system for rest of the works and I always need to switch to PHP4 when I need to work for them.

    And regarding IE6, we cannot avoid yet because most of the users in the world have Windows XP which originally has IE6 in it. In otherwise case, I would really have deleted/removed IE6 from my dictionary
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  17. #17
    SitePoint Enthusiast
    Join Date
    Sep 2007
    Location
    Pakistan
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No question about new projects.

  18. #18
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,863
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Jafar View Post
    I was checking db class of wordpress and discovered they somehow considered php4 compatibility
    When WordPress was first created PHP 4 was the latest and greatest and so of course WordPress was designed to be able to run there. Why add to the workload by spending time deleting all the compatibility for PHP 4 when the time could be better spent adding new features?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  19. #19
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    Why add to the workload by spending time deleting all the compatibility for PHP 4 when the time could be better spent adding new features?
    Generally I find complete rewrites, without the restriction of older versions, allows for easier addition of features and more possibilities.

    Though, to be fair, PHP 4 wasn't exactly incapable - it just meant having to approach things differently.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  20. #20
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,863
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Jake Arkinstall View Post
    Generally I find complete rewrites, without the restriction of older versions, allows for easier addition of features and more possibilities.
    With WordPress I'd expect new features to be added that will only function with PHP 5. The PHP 4 compatibility would be progressively removed as it interferes with the new features rather than someone specifically going through and rewriting everything to get rid of it. I'd expect the same to be true of any other open source software.

    If it aint broke then why risk breaking it by trying to fix it?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  21. #21
    SitePoint Enthusiast BMorganVA's Avatar
    Join Date
    Mar 2010
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Leave them. They're both too old have have bugs that have been solved.


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
  •