PHP 4 or PHP 5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jeigh
    New Member
    • Jul 2007
    • 73

    PHP 4 or PHP 5

    As I've mentioned before I'm creating a new and am trying to cover everything before I start, so I save myself a lot of work later.

    One thing that has been concerning me for a while is the upgrade to PHP 5. I've tried searching around and can't seem to find much on how differently PHP 5 works regarding coding. I assume it isn't a very smart idea to just stick with PHP 4 so my question is what exactly has changed in PHP 5 and what do I need to do to ensure my code works on PHP 5.

    Thanks in advance for any help.
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    What's new to php 5

    Hope this helps.

    Comment

    • Jeigh
      New Member
      • Jul 2007
      • 73

      #3
      Thanks for that, very helpful info.

      Just want to clarify, I'm under the impression that if I use a script that works on PHP 4 it should still work on PHP 5 for the most part. So am I able to continue to code how I always have or are there any common things that will no longer work or are deprecated.

      Thanks again.

      Comment

      • dlite922
        Recognized Expert Top Contributor
        • Dec 2007
        • 1586

        #4
        Originally posted by Jeigh
        Thanks for that, very helpful info.

        Just want to clarify, I'm under the impression that if I use a script that works on PHP 4 it should still work on PHP 5 for the most part. So am I able to continue to code how I always have or are there any common things that will no longer work or are deprecated.

        Thanks again.
        Load it on a test Server with PHP5 and configure it for production (apache settings, php.ini etc).
        Fix errors as necessary.

        I think the comfort that you need is that there's nothing in PHP4 that needs alot of re-coding to be done in PHP5.

        If anything, PHP5 is likely to reduce, simplify your code.

        Make the jump now before it is too late I say.

        Comment

        • coolsti
          Contributor
          • Mar 2008
          • 310

          #5
          I am also migrating my application to a new server that is using PHP5 rather than PHP4, and I also was concerned that I needed to do a lot of recoding, but it seems that this is not the case. Everything seems to work well, although if I have showing warning etc. messages turned on, I get a lot more of these.

          It would pay to be aware of the changes, however, so that you write any new code in the manner that PHP5 expects.

          Comment

          Working...