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.

How difficult is it to move from PHP4 to PHP5 ?

Discussion in 'PHP' started by gropius, Oct 16, 2007.

  1. #1
    We have a brand new website Just launch in June. The developers built it on PHP 4 we wnet to upgrade or hosting to VSP and found no space available. Then only to find out PHP 4 will not be supported afte Dec. this year. Can anyone give us some insight on what we have in front of us? The amount of work ect?
    SEMrush
    The hosting company says we have no choice but to upgrade.

    Thanks
     
    gropius, Oct 16, 2007 IP
    SEMrush
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
  3. gropius

    gropius Peon

    Messages:
    126
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Wow wee thanks nico
     
    gropius, Oct 16, 2007 IP
  4. drewbe121212

    drewbe121212 Well-Known Member

    Messages:
    733
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    125
    #4
    I can tell you there are not that many differences. Most PHP Code will work with PHP 5, just not vica versa. There are a few querks and issues, but only if you happen to run into those little specific things (which are provided in the link above).

    Personally I am all about PHP 5 and its objects, and its time people drop 4, seeing as how 6 is almost ready to be released.
     
    drewbe121212, Oct 17, 2007 IP
    phpl33t likes this.
  5. Mat2000

    Mat2000 Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It's not so hard.

    For me this resource helped me a lot.

    Migrating from PHP 4 to PHP 5
    /derickrethans.nl/pres-breaking/talk.html
     
    Mat2000, Oct 17, 2007 IP
  6. gropius

    gropius Peon

    Messages:
    126
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Again thanks we were really worreid for a while, this info has really helped.
     
    gropius, Oct 21, 2007 IP
  7. tonybogs

    tonybogs Peon

    Messages:
    462
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This all depends on your coders.

    If you have experienced PHP5 programmers writing in PHP4 you might not need to change anything.
     
    tonybogs, Oct 22, 2007 IP
  8. phpl33t

    phpl33t Banned

    Messages:
    456
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #8
    php4 -> php5 is a breeze, if coded correctly from the start, you should not see any major issues.

    Best thing to happen to php thus far.
     
    phpl33t, Oct 22, 2007 IP
  9. gropius

    gropius Peon

    Messages:
    126
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    well I don't know about my original coders, I have fears, any guess on the cost for a 5,000 product site.
     
    gropius, Oct 22, 2007 IP
  10. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I'm not sure if there are major differences anyway. Only with really advanced stuff i think?
     
    Noddegamra, Oct 23, 2007 IP
  11. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #11
    From PHP4 -> PHP5 it's fairly easy. If you're going back (NEVER SHOULD BE) then you'll have to rewrite loads of custom functions for the ones you lost.

    I've personally written a large amount of custom functions, along with the if(!function_exists) command, so I can make the function work in both PHP4+5.
     
    Danltn, Oct 23, 2007 IP
  12. drewbe121212

    drewbe121212 Well-Known Member

    Messages:
    733
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    125
    #12
    There should be no reason one would have to re-write anything going from PHP 4 to PHP 5. It is mostly in the objects that get the overhaul. A few reserved keyword functions and the like, and a lot of bug fixes. Standard procedural based PHP will be clear, and if you happened to use one of the invalid functions on the switch, simply change it. Only minor differences happened with the code, not major.
     
    drewbe121212, Oct 25, 2007 IP
  13. redhits

    redhits Notable Member

    Messages:
    3,023
    Likes Received:
    277
    Best Answers:
    0
    Trophy Points:
    255
    #13
    if the codes are in PHP3 it can work in PHP4 and in PHP5
    ...
     
    redhits, Oct 25, 2007 IP