SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Backwards Compatibility from PHP5

    Is there any scripts in progress, which deals with backwards compatibility from PHP5, such as the MySQL/MySQLi compatibility layer script?

    Edit:


    I'm referring to public, private, protected etc, with OOP.

  2. #2
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean a way to make PHP5 objects that use public, private, etc. to work in PHP4? That wouldn't be possible without a patch to the source code of PHP itself.
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor

  3. #3
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And if you mean PHP4 scripts working in PHP5, they already do.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Lange
    And if you mean PHP4 scripts working in PHP5, they already do.
    Well, what happens when you declare a variable private, public protected etc. Then what happens, I am refferring specifically towards OOP in PHP5.

  5. #5
    SitePoint Addict
    Join Date
    Aug 2002
    Location
    Ottawa, Ontario, Canada
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, if you are using PPP declarations you are obviously coding for PHP5, and I don't think it is likely that Zend would patch PHP4 just to allow those declarations to be ignored (or otherwise handled)... its a nightmare to think of that! lol

    Cheers,
    Keith.

  6. #6
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Taoism
    Well, if you are using PPP declarations you are obviously coding for PHP5, and I don't think it is likely that Zend would patch PHP4 just to allow those declarations to be ignored (or otherwise handled)... its a nightmare to think of that! lol

    Cheers,
    Keith.
    The reason I asked, was simply, to create a simple overlay, to swap privates, const's, publics that will allow PHP5 to parse in PHP4, which is the same thing they have done for 'MySQL/MySQLi compatibility layer script'.

  7. #7
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Andrew-J2000
    The reason I asked, was simply, to create a simple overlay, to swap privates, const's, publics that will allow PHP5 to parse in PHP4, which is the same thing they have done for 'MySQL/MySQLi compatibility layer script'.
    Taoism did you delete your post below, or is SP, playing up again as i've noticed it sometimes doesn't show the newest post if its on a new page.

    Well, I just did a quick Google on the 'MySQL/MySQLi compatibility layer script' and from what I could find (2 hits, yay), it looks like a proposed extension that someone would compile into PHP to map the MySQL calls to MySQLi until the developer "gets around" to changing all the native MySQL calls to MySQLi??
    Anyway I see what you mean and I completely agree with you.

    I don't think that a compiled extension (for PHP5 -> PHP4 conversion) would be made, and although I have no doubt someone could write a PHP-based parser to tokenize and parse a class definition and convert it from PHP5 syntax to PHP4 syntax, I would guess the overhead (if done as a run-time thing) would be far too great. However as a "[u]one time parse and then write the converted file out" concept it could work.
    Just out of curiousity, what percetage of hosts do you expect to adopt PHP5, within the first week of the official release?

  8. #8
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The first week? I would say virtually none. You should wait about 3 months until you write for PHP5 and expect it to work for anyone.
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor

  9. #9
    SitePoint Addict
    Join Date
    Aug 2002
    Location
    Ottawa, Ontario, Canada
    Posts
    214
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Andrew-J2000
    Taoism did you delete your post below
    Yes, I deleted it.... Talk about hitting "reply" in a hurry, it was up for all of 30 seconds before I decided to remove it

    Cheers,
    Keith.

  10. #10
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take of PHP5 hosting within the first week ?

    Umm... Very few I'd imagine as, as soon as a stable release is available officially then the hosts for the most part would need the time to install, configure and test yes ?

    IMO it'd be at least 2-3 weeks before you see mainstream PHP5 hosting after the official announcment ?

    Fair enough there are beta releases at the moment although in truth this has very little to do with the final release as there are bound to be changes et al.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •