1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP4 vs PHP5

Discussion in 'PHP' started by Connect, Aug 12, 2005.

  1. #1
    Are you using PHP5? What do you think of it compared to PHP4? What are the features you like in PHP5, or dislike?

    Just see if I should upgrade to PHP5 ;)
     
    Connect, Aug 12, 2005 IP
  2. mck9235

    mck9235 Peon

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I personally have used PHP5, but i'd rather stick with 4 for now, mainly becuase thats what most scripts use. PHP5 does have stronger OOP abilitys, but that doesn't outweigh the cons for me. I'm not a fan of the mysqli extension either, I didn't see anything wrong with general mySQL.

    Just my 2 cents.
     
    mck9235, Aug 12, 2005 IP
  3. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #3
    I think you'll find better support for php4 out there if you are using anything other than custom scripts. I thought about going the 5 route since I'm doing a fresh install right now, but it's just not worth it yet. The smart people always adopt about 6-12 months after the early adopters say it's stable.

    Unless you have a need, or are looking to do some new development for a big project, stick to 4.

    Heck, php themselves told everyone to stay away from apache 2 for a really long time. To the point where the apache developers started to get bent out of shape about it.
     
    nevetS, Aug 12, 2005 IP
  4. Connect

    Connect Guest

    Messages:
    191
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I am not doing some new development for a big project. I just want to see how other developers think about PHP5, to see if it is worthy to install and start "learning" it.
     
    Connect, Aug 13, 2005 IP
  5. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #5
    To start learning it? Definitely.
     
    nevetS, Aug 13, 2005 IP
  6. Connect

    Connect Guest

    Messages:
    191
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ya, better start learning it first. Is there a way to have PHP4 and PHP5 to co-exist on the same machine?
     
    Connect, Aug 13, 2005 IP
  7. Willy

    Willy Peon

    Messages:
    281
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sure. Assuming you mean your desktop machine, some possibilities that come to mind:
    - Just switch (manually) between two Apache configuration files (one Apache installation), one for PHP4 and the other for PHP5. Disadvantage is you can't run both at the same time.
    - Keep two separate Apache installations, on different ports for instance. Both will run at the same time. Might have to install Apache 1.3 and Apache 2 in order to allow two installations (on Windows).
    - Try installing some pre-packaged WAMP suite (Apache + MySQL + PHP for Windows) in two different locations. As they are usually self-contained in their parent directory, this could be the easiest solution.

    If you want to run both on your server, it will depend a lot on what operating system the server runs. I think Debian Linux, for instance, would allow you to have both PHP versions as they've cleanly separated the packages, configuration directories etc.
     
    Willy, Aug 13, 2005 IP
  8. nevetS

    nevetS Evolving Dragon

    Messages:
    2,544
    Likes Received:
    211
    Best Answers:
    0
    Trophy Points:
    135
    #8
    What he said...

    It's easiest if you are custom compiling on linux and not using an RPM distro. If you have to use RPM's, you might be able to get away with 1.3x with php4 and 2.x with php5, but you need to check the install directories out. I suppose you could do it on a single apache install if you were using php as a cgi, but it's going to be a lot easier to deal with if you just have two apache installs on the machine in different directories.
     
    nevetS, Aug 13, 2005 IP
  9. Connect

    Connect Guest

    Messages:
    191
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I actually meant to have it installed on my desktop machine - Windows. My favorite WAMP is EasyPHP. The latest version which is version 1.8 doesn't incorporate PHP5 yet.

    I wonder if I get another WAMP such as http://www.wampserver.com/en/index.php, will it screw up my existing apache + PHP installation?

    Have you used any other WAMP?
     
    Connect, Aug 13, 2005 IP
  10. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #10
    I use Wampserver and I have found it to be the easiest of the "prepackaged" systems to use. You can get a PHP4 add-on as well as several others they have, best buy for the money ;)
     
    palespyder, Aug 14, 2005 IP
  11. Connect

    Connect Guest

    Messages:
    191
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Do you have to pay for WAMP5 or the add-ons?
     
    Connect, Aug 15, 2005 IP
  12. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #12
    No that was a joke, I figured it would come off poorly. It's completely free
     
    palespyder, Aug 15, 2005 IP
  13. daed

    daed Peon

    Messages:
    93
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #13
    It's not hard at all to write scripts cross-compatible with both versions, but for some odd reason a lot of larger programs used constructs that should have never been used anyway, which is why they're deprecated now.. and it breaks quite a few of the older programs. Even though my scripts port fine to PHP5, it's pretty much useless on a production server due to legacy scripts.
     
    daed, Aug 15, 2005 IP
  14. nidz

    nidz Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Hi experts,
    M newbie to php...Can anybody tell me why should we use PHP5 version as I've been asked this question in an Interview and I din have perfect answer for that...I did googling with this...but I want to know whether I was asked to compare Php4 with PHP5 or PHP5 with simple(non object oriented).
    Please reply
     
    nidz, May 22, 2008 IP
  15. eyesdrinker

    eyesdrinker Greenhorn

    Messages:
    99
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    20
    #15
    @nidz simple answer every new version comes out is better than the old one, same with PHP5, many bug fixes, better OOP, many new functions and supports and much more
     
    eyesdrinker, Jun 8, 2011 IP
  16. mpa360

    mpa360 Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Clear that PHP 5 is better
    PHP 5 came with more object-oriented features...
     
    mpa360, Jun 9, 2011 IP
  17. pr-biztech

    pr-biztech Peon

    Messages:
    76
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    You are right new PHP5 has lots of new features which is shared here by you.
    Can you explain some deeply abut new features.
     
    pr-biztech, Jun 9, 2011 IP
  18. The Webby

    The Webby Peon

    Messages:
    1,852
    Likes Received:
    30
    Best Answers:
    1
    Trophy Points:
    0
    #18
    Do you guys have any idea that, you are commenting on a topic made in 2005? :D
    Anyone uses php 4 anymore these days? Really??
     
    The Webby, Jun 11, 2011 IP
  19. TheDataPlanet.com

    TheDataPlanet.com Well-Known Member

    Messages:
    503
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #19
    TheDataPlanet.com, Jun 12, 2011 IP
  20. pr-biztech

    pr-biztech Peon

    Messages:
    76
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    pr-biztech, Jun 17, 2011 IP