PHP 5 or PHP 4 compatible codes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • R. Rajesh Jeba Anbiah

    PHP 5 or PHP 4 compatible codes

    Kinda OT. I haven't yet moved to PHP5. But, interested to know how
    many of you _really_ started using it or moved? Are you doing any
    compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4
    (backward compatible)?

    --
    | Just another PHP saint |
    Email: rrjanbiah-at-Y!com
  • Berislav Lopac

    #2
    Re: PHP 5 or PHP 4 compatible codes

    R. Rajesh Jeba Anbiah wrote:[color=blue]
    > Kinda OT. I haven't yet moved to PHP5. But, interested to know how
    > many of you _really_ started using it or moved? Are you doing any
    > compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4
    > (backward compatible)?[/color]

    Basically, if you code for PHP4, it will work in PHP5. However, if you wish
    to take advantage of the full PHP5 abilities, scrap backward compatibility.

    Berislav

    --
    If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
    Groucho, Chico, and Harpo, then Usenet is Zeppo.


    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: PHP 5 or PHP 4 compatible codes

      "Berislav Lopac" <berislav.lopac @dimedia.hr> wrote in message news:<cdfr9s$6q s$1@ls219.htnet .hr>...[color=blue]
      > R. Rajesh Jeba Anbiah wrote:[color=green]
      > > Kinda OT. I haven't yet moved to PHP5. But, interested to know how
      > > many of you _really_ started using it or moved? Are you doing any
      > > compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4
      > > (backward compatible)?[/color]
      >
      > Basically, if you code for PHP4, it will work in PHP5. However, if you wish
      > to take advantage of the full PHP5 abilities, scrap backward compatibility.
      >[/color]

      So, are you writing codes with any compatibility care?

      --
      | Just another PHP saint |
      Email: rrjanbiah-at-Y!com

      Comment

      • Savut

        #4
        Re: PHP 5 or PHP 4 compatible codes

        You should consider compatibility if you distribute your software as very
        few web servers are migrated to PHP5, which is still not recommended for
        production server at this stage. If you own your own server, I dont see any
        need to do so.

        Savut


        "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
        news:abc4d8b8.0 407190350.47eff 0fb@posting.goo gle.com...[color=blue]
        > "Berislav Lopac" <berislav.lopac @dimedia.hr> wrote in message
        > news:<cdfr9s$6q s$1@ls219.htnet .hr>...[color=green]
        >> R. Rajesh Jeba Anbiah wrote:[color=darkred]
        >> > Kinda OT. I haven't yet moved to PHP5. But, interested to know how
        >> > many of you _really_ started using it or moved? Are you doing any
        >> > compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4
        >> > (backward compatible)?[/color]
        >>
        >> Basically, if you code for PHP4, it will work in PHP5. However, if you
        >> wish
        >> to take advantage of the full PHP5 abilities, scrap backward
        >> compatibility.
        >>[/color]
        >
        > So, are you writing codes with any compatibility care?
        >
        > --
        > | Just another PHP saint |
        > Email: rrjanbiah-at-Y!com[/color]

        Comment

        • Berislav Lopac

          #5
          Re: PHP 5 or PHP 4 compatible codes

          Savut wrote:[color=blue]
          > "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
          > news:abc4d8b8.0 407190350.47eff 0fb@posting.goo gle.com...[color=green]
          >> "Berislav Lopac" <berislav.lopac @dimedia.hr> wrote in message
          >> news:<cdfr9s$6q s$1@ls219.htnet .hr>...[color=darkred]
          >>> R. Rajesh Jeba Anbiah wrote:
          >>>> Kinda OT. I haven't yet moved to PHP5. But, interested to know how
          >>>> many of you _really_ started using it or moved? Are you doing any
          >>>> compatible tweaks specifically for PHP 5 (forward compatible) or
          >>>> PHP 4 (backward compatible)?
          >>>
          >>> Basically, if you code for PHP4, it will work in PHP5. However, if
          >>> you wish
          >>> to take advantage of the full PHP5 abilities, scrap backward
          >>> compatibility.
          >>>[/color]
          >>
          >> So, are you writing codes with any compatibility care?
          >>
          >> --[color=darkred]
          >>> Just another PHP saint |[/color]
          >> Email: rrjanbiah-at-Y!com[/color]
          >
          > You should consider compatibility if you distribute your software as
          > very few web servers are migrated to PHP5, which is still not
          > recommended for production server at this stage. If you own your own
          > server, I dont see any need to do so.
          >
          > Savut
          > http://www.savut.com[/color]

          This is a good advice. For the time being, use PHP5 only when your
          application is to be run on a server that you have complete control over,
          and even then only for non-critical applications. I have PHP5 on my own dev
          computer both at home and ad work, and am testing its details and features,
          but all our applications are still developed in PHP4. But when the Great
          Switch To PHP5 (TM) comes, I'll have a head start.

          Berislav

          --
          If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
          Groucho, Chico, and Harpo, then Usenet is Zeppo.


          Comment

          • Andy Hassall

            #6
            Re: PHP 5 or PHP 4 compatible codes

            On 18 Jul 2004 23:23:27 -0700, ng4rrjanbiah@re diffmail.com (R. Rajesh Jeba
            Anbiah) wrote:
            [color=blue]
            >Kinda OT. I haven't yet moved to PHP5. But, interested to know how
            >many of you _really_ started using it or moved? Are you doing any
            >compatible tweaks specifically for PHP 5 (forward compatible) or PHP 4
            >(backward compatible)?[/color]

            I've only done very brief testing (an hour or two) on the 5.0.0 release, and
            got Mysterious Crashes when using Oracle. Probably just teething troubles, but
            it's put me off for the moment until I get a bit more time to trace it back.

            --
            Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
            http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

            Comment

            • Zurab Davitiani

              #7
              Re: PHP 5 or PHP 4 compatible codes

              Berislav Lopac wrote:
              [color=blue]
              > Basically, if you code for PHP4, it will work in PHP5. However, if you
              > wish to take advantage of the full PHP5 abilities, scrap backward
              > compatibility.[/color]

              One of the things you need to be careful of is not to depend on passing by
              value. In PHP4 if you pass an object and modify it, a copy is modified. If
              you run that code in PHP5 it will modify the original variable and that may
              not be a desired effect if you depended on that variable later on in your
              PHP4 script.

              One way to improve PHP5 compatibility is to avoid depending on passing
              objects by value; if you do pass an object in PHP4, make sure the function
              you are passing it to has a '&' in front of the argument, so that you are
              sure you are working on a reference.

              Comment

              • R. Rajesh Jeba Anbiah

                #8
                Re: PHP 5 or PHP 4 compatible codes

                Andy Hassall <andy@andyh.co. uk> wrote in message news:<pd8of0pvr 10qvup8fj7dt8vn f8m3kaqffm@4ax. com>...
                <snip>[color=blue]
                > I've only done very brief testing (an hour or two) on the 5.0.0 release, and
                > got Mysterious Crashes when using Oracle. Probably just teething troubles, but
                > it's put me off for the moment until I get a bit more time to trace it back.[/color]

                So, this force us to write forward compatible codes?

                --
                | Just another PHP saint |
                Email: rrjanbiah-at-Y!com

                Comment

                • Savut

                  #9
                  Re: PHP 5 or PHP 4 compatible codes


                  "R. Rajesh Jeba Anbiah" <ng4rrjanbiah@r ediffmail.com> wrote in message
                  news:abc4d8b8.0 407192222.1ef5f 582@posting.goo gle.com...[color=blue]
                  > Andy Hassall <andy@andyh.co. uk> wrote in message
                  > news:<pd8of0pvr 10qvup8fj7dt8vn f8m3kaqffm@4ax. com>...
                  > <snip>[color=green]
                  >> I've only done very brief testing (an hour or two) on the 5.0.0 release,
                  >> and
                  >> got Mysterious Crashes when using Oracle. Probably just teething
                  >> troubles, but
                  >> it's put me off for the moment until I get a bit more time to trace it
                  >> back.[/color]
                  >
                  > So, this force us to write forward compatible codes?
                  >[/color]

                  This mean PHP5 still has lot of bugs
                  I dont have any problem with PHP5 and Oracle 9 on Linux

                  Savut


                  Comment

                  Working...