What is the difference between PHP4 and PHP5

Discussion in 'PHP' started by nshahidch, Nov 21, 2007.

  1. #1
    I am asking because I have some packages which runs very smoothly in PHP4 but the give errors in PHP5.

    Like enexpected $end at the line no---
    But the line no is the end of the page....

    So what I have to do to coorect it...

    Please help me its urgent...
     
    nshahidch, Nov 21, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Do you actually want to know all differences, or just the solution to your problem?

    You will need to post your code. Though, I don't think it's a PHP 4/5 issue.
     
    nico_swd, Nov 21, 2007 IP
  3. serialCoder

    serialCoder Guest

    Best Answers:
    0
    #3
    Like enexpected $end at the line no

    this error is usually caused by a missing } (closing bracket)
    and i must agree with nico_swd, i dont think this had anything to do with the php version
     
    serialCoder, Nov 21, 2007 IP
  4. codyturk

    codyturk Well-Known Member

    Messages:
    340
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #4
    The main differences are PHP 5 puts more focus on advanced OOP techniques and concepts.

    For example before PHP 5 classes used this __constructor() to define constructors; However, in PHP 5 constructors are the name of the class.

    The syntax is exactly the same there is some newer functions.
     
    codyturk, Nov 21, 2007 IP