PHP4 vs PHP5 ????

Discussion in 'PHP' started by tomsign, Jul 19, 2010.

  1. #1
    Hi,

    So tell me, why oh why they not allow PHP5 script work with PHP4 ?


    Thanks:)
     
    tomsign, Jul 19, 2010 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #2
    PHP5 introduced a whole lot of new functionality so chances are your PHP5 script has functions within it that PHP4 doesn't recognise.

    When choosing hosting insist on PHP5.
     
    sarahk, Jul 19, 2010 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    PHP 5 has functionality which PHP 4 does'nt have.
     
    danx10, Jul 19, 2010 IP
  4. EvanP

    EvanP Banned

    Messages:
    1,731
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I would have to say PHP5 everyday. It's got more features and is generally easier to use. ;)
     
    EvanP, Jul 19, 2010 IP
  5. Deacalion

    Deacalion Peon

    Messages:
    438
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    For the same reasons your car doesn't run on coal and Firefox doesn't run in MSDOS.

    Besides, there's a hell of a lot of compatibility with PHP 4 and 5. :)
     
    Deacalion, Jul 19, 2010 IP
  6. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #6
    Because PHP5 scripts are PHP5 scripts, and PHP4 scripts are PHP4 scripts. Now, want me to tell you about PHP6? ;) lol
     
    Rainulf, Jul 19, 2010 IP
  7. barrywolf

    barrywolf Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Are PHP 5 servers backwards compatible with PHP 4? Or will it just melt like when you try to use PHP 5 code on a PHP 4 server?
     
    barrywolf, Jul 21, 2010 IP
  8. sarahk

    sarahk iTamer Staff

    Messages:
    28,901
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #8
    They're backwards compatible... although some commands are "deprecated" which means don't use them for new code because they will be dropped in future PHP versions.
     
    sarahk, Jul 21, 2010 IP
  9. dacash

    dacash Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Also PHP5 has a real OOP. So if your code in PHP5 uses OOP from PHP5 then won't work in PHP4.
     
    dacash, Jul 21, 2010 IP