PHP 5: Will it hurt?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Smitro

    PHP 5: Will it hurt?

    Hi all,

    I'm currently on using PHP 4. (what ever the
    latest is) and I'm looking at moving to PHP5. Just
    wondering, should I have moved by now? is there a
    lot of people out their holding back?

    My biggest worry is will it break my site? I had a
    quick wonder through the Release notes and it
    doesn't look like any functions I normally use
    have been taken out. Just looking for some
    feedback. and what it has done to others.
  • Jerry Stuckle

    #2
    Re: PHP 5: Will it hurt?

    Smitro wrote:[color=blue]
    > Hi all,
    >
    > I'm currently on using PHP 4. (what ever the latest is) and I'm looking
    > at moving to PHP5. Just wondering, should I have moved by now? is there
    > a lot of people out their holding back?
    >
    > My biggest worry is will it break my site? I had a quick wonder through
    > the Release notes and it doesn't look like any functions I normally use
    > have been taken out. Just looking for some feedback. and what it has
    > done to others.[/color]

    Smitro,

    There are some changes in PHP5. You'll want to go eventually, but only you can
    decide if now is the right time. It all depends on your site and what it does.

    If you do change, ensure you do a lot of testing before you go "live". It's the
    things that 'shouldn't affect you' which will get you every time!

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Smitro

      #3
      Re: PHP 5: Will it hurt?

      > It's the things that 'shouldn't affect you' which will get you every time!

      True, true.

      Comment

      • Wayne

        #4
        Re: PHP 5: Will it hurt?

        On Sat, 27 Aug 2005 07:38:46 +1000, Smitro <nospam@myh0use .c0m> wrote:
        [color=blue]
        >I'm currently on using PHP 4. (what ever the
        >latest is) and I'm looking at moving to PHP5. Just
        >wondering, should I have moved by now?[/color]

        I'm currently do all new development in PHP5.
        [color=blue]
        >is there a
        >lot of people out their holding back?[/color]

        All my old sites are running PHP4 with absolutely no intention of
        upgrading them to PHP5. Too much trouble.
        [color=blue]
        >My biggest worry is will it break my site?[/color]

        Probably. PHP5 has a different (better) way of doing a lot of stuff.
        However, they have taken lots of care in working on backwards
        compatitibly. Your best bet is move your site to PHP5 in a test
        environment and make the necessary modifications to have it work
        right. If you don't use objects/classes you might not have to change
        anything at all.

        Comment

        • Henk Verhoeven

          #5
          Re: PHP 5: Will it hurt?

          Smitro wrote:
          [color=blue]
          > Hi all,
          >
          > I'm currently on using PHP 4. (what ever the latest is) and I'm looking
          > at moving to PHP5. Just wondering, should I have moved by now? is there
          > a lot of people out their holding back?
          >
          > My biggest worry is will it break my site? I had a quick wonder through
          > the Release notes and it doesn't look like any functions I normally use
          > have been taken out. Just looking for some feedback. and what it has
          > done to others.[/color]

          Hi Smitro,

          I think upgrading is not a big issue for most people because website
          hosting providers do not seem to be very quick with upgrading their
          hosting services. But php5 is included in Fedora core 4, which was
          annouced in june 2005, so maybe things are about to change.

          If you are not using objects, there is a good chance that it will simply
          work. But to prevent possible problems you can look into
          http://www.php.net/manual/en/migrati...compatible.php and search your
          code for the use of variables and functions that are not entirely
          compatible (With an editor like UltraEdit searching all files in a
          folder and all its subfolders is easy). Probably your code does not do
          the kind of things that are no longer supported. But if you are not
          sure, you can prevent them from breaking your code by adding some
          conditions that check for situations that will become a problem in php5
          and log them if they occur. Then you put it to run on your site, still
          on php4, wait for several weeks, then download the problems log. If you
          use the same function for all logging, it should be easy enough to find
          and remove the logging code after you upgraded to php5.

          And even if you do use objects: with phpPeanuts i have managed to make
          allmost the entire framework portable: it does the same on both php4 and
          php5. This took several days work, but OK, this is hundreds of Kbs of
          OOP code. I ended up with only a few functions that are version specific
          and the framework now automatically loads the right implementation. And
          of course there are a few rules to attend if you want your own
          applications to be portable too. If you need your site to be portable,
          you can download a portable version and take a look at it, the version
          specific functions are included from classes/generalFunction s.php and
          there the readme has a section on portability.

          Greetings,

          Henk Verhoeven,
          www.phpeanuts.org.



          Comment

          Working...