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.

difference between php4 and php5

Discussion in 'PHP' started by balaganesh, Jul 11, 2011.

  1. #1
    difference between php4 and php5 please give me answer
     
    balaganesh, Jul 11, 2011 IP
  2. ThatKidBanks

    ThatKidBanks Member

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    I use Joomla CMS and from my perspective it all comes down to compatibility. Some extensions work in PHP4 that don't work in PHP5 and viceversa.
     
    ThatKidBanks, Jul 11, 2011 IP
  3. elicitservers

    elicitservers Peon

    Messages:
    714
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    0
    #3
    PHP4 is deprecated, PHP5 isn't. ;)
     
    elicitservers, Jul 11, 2011 IP
  4. Guisbar

    Guisbar Well-Known Member

    Messages:
    1,047
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    150
    #4
    There are a lot of differences. I think the most important was the OOP improvements, and the way objects are automatically passed as references (like they should be).

    PHP 5 has more functions and works faster. I don't think there is ANY excuse for using PHP4.
     
    Guisbar, Jul 11, 2011 IP
  5. akshat.gl

    akshat.gl Member

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #5
    Many new functions were introduced in PHP5. Also, many old functions were edited.
    For eg strrcmp function.

    Also, as ThatKidBanks said some CMS dont work with PHP5. (JOOMLA 1.5)
     
    akshat.gl, Jul 11, 2011 IP
  6. AdsMakeSense

    AdsMakeSense Active Member

    Messages:
    389
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    70
    #6
    In with the new out with the old.
    PHP depreciates several old PHP4 functions.
    It also add several new methods, functions...etc
     
    AdsMakeSense, Jul 11, 2011 IP
  7. FFMG

    FFMG Well-Known Member

    Messages:
    1,091
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    160
    #7
    It depends, what are you trying to do?
    If you are creating a brand new site, then use php5 as php 4 is no longer supported.

    If you are trying to migrate a site then you will need to look at many things like 'super-global' variables, short tags, deprecated functions and so forth.

    But I wouldn't even consider staying on php4, you might want to do the work now and move to php5 rather than later and be forced to take the plunge.

    FFMG
     
    FFMG, Jul 11, 2011 IP
  8. seller2551

    seller2551 Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    PHP 5 has new functions in it, as well as tons of modifications to old ones.
     
    seller2551, Jul 12, 2011 IP