Slashdot Mirror


PHP 5 Release Candidate 2 Released

alexre1 writes "From the PHP website: 'The second Release Candidate of PHP 5 is now available! This mostly bug fix release improves PHP 5's stability and irons out some of the remaining issues before PHP 5 can be deemed release quality. Note that it is still not recommended for mission-critical use but people are encouraged to start playing with it and report any problems.' Cool! Hopefully we'll have a stable PHP 5.0 soon."

39 comments

  1. PHP5 by Leffe · · Score: 5, Interesting

    I run PHP5 on one of my developer boxes(I should install it on the other one too, but I'm lazy), and as far as I know it's completely back-compatible(except from some new reserved keywords, but that's easy to fix). All the new features are really nice, and I have to say that I noticed a tiny gain in speed too.

    There's no reason not to switch to PHP5, everyone please do it now! Writing back-compatible code is no fun, I want to use all the new and exciting OOP features.

    Here's a page describing all the new features in PHP5 and the ZEND engine version 2!

    1. Re:PHP5 by eddy+the+lip · · Score: 5, Interesting
      ...and as far as I know it's completely back-compatible(except from some new reserved keywords, but that's easy to fix)

      If this is true, it takes away one of my major fears about PHP5. They haven't exactly been careful about this in the past, and there's been more than one occasion where I was franticaly updating mounds of code because they decided something should be spelled different.

      I've been keeping half an eye on the changes, and the only thing that had twigged as a possible issue so far was in classes, especially changing the default contstructor. Changing the name of a constructor isn't a big deal in itself, but I'd be doing it in a lot of code, distributed across many, many sites. I'd be very happy to put this particular fear to rest.

      That aside, I am looking forward to the new OOP features. 95% of what I write is OOP, and there are some things in there I've been wanting for a long time.

      --

      This is the voice of World Control. I bring you Peace.

    2. Re:PHP5 by nsebban · · Score: 1

      I think most people look for stability, before backward compatibility.

      --
      ____
      nico
      Nico-Live
    3. Re:PHP5 by Anthony+Boyd · · Score: 2, Insightful
      as far as I know it's completely back-compatible

      Except for the whole copy-by-reference thing. Of course the new way is better, but people who relied on the old way might be surprised by some unexpected values.

      There's no reason not to switch to PHP5, everyone please do it now!

      Except that "it is still not recommended for mission-critical use," right?

    4. Re:PHP5 by Khazunga · · Score: 1
      Except for the whole copy-by-reference thing. Of course the new way is better, but people who relied on the old way might be surprised by some unexpected values.
      From the annoucement:
      The Zend Engine I compatibility mode (zend.ze1_compatibility_mode) has been re-implemented to more accurately support PHP 4's object auto-clone behavior.
      So, hopefully, this was fixed.
      Except that "it is still not recommended for mission-critical use," right?
      Naturally. It's a release candidate, remember?
      --
      If at first you don't succeed, skydiving is not for you
    5. Re:PHP5 by Shaklee39 · · Score: 1

      Wrong. I put php5 up on a very large website and there were multiple errors, mainly in class design. It is not a drop in replacement for php4, it requires a rewrite a php4 code.

  2. hello?!? by Charles+Dart · · Score: 3, Insightful


    Considering how much of the web runs on PHP, I am surprized at the lack of interest in this new release. PHP 5 when combined with MySQL 4 is going to do some amazing things.

    Wake up you people!

    1. Re:hello?!? by mercuriser · · Score: 5, Informative

      It's going to be even better then that!

      PHP5 comes with its very own integrated 'lite' sql server that can handle simple queries very very quickly.

      The decision to implement SQLite into PHP5 is "good for small and mid-sized applications, because the database lives on the same server as the application that is using it"

    2. Re:hello?!? by jasoncart · · Score: 5, Informative

      What about MySQL 5? Stored procedures seems to be the biggest new feature...

    3. Re:hello?!? by /dev/trash · · Score: 1

      Oh cool, so now it will almost be on par with the other 50 databases out there.

    4. Re:hello?!? by /dev/trash · · Score: 1

      Like what?

    5. Re:hello?!? by Crayon+Kid · · Score: 1

      Considering how much of the web runs on PHP, I am surprized at the lack of interest in this new release. PHP 5 when combined with MySQL 4 is going to do some amazing things. Wake up you people!

      Not quite. Most of the PHP Web out there is not using the bleeding edge features, or even the recent ones. Hosting services will wait for a while before installing 5, and so on.

      --
      i ate crayons when i was a kid and now i have two braincells and the blue ones taste nicer
    6. Re:hello?!? by Anonymous Coward · · Score: 0

      No no, not implement, you mean integrate!

      What they have done is to integrate an existing database.

    7. Re:hello?!? by Anonymous Coward · · Score: 0

      MySQL 5 is SAP DB, it's not their product, so it's not really anything to be excited about, the users of SAP DB have had this from the start.

      People are better off with PostgreSQL anyway.

    8. Re:hello?!? by billcopc · · Score: 1

      Yes, but built from a hacker's point of view. And free... hello ?

      --
      -Billco, Fnarg.com
  3. Changes are bad? by DamienMcKenna · · Score: 2, Insightful

    All of the changes made so far have been for good reasons, usually security. The $GLOBALS change was a major boon to security, and I'm personally glad that one of the 4.3.x releases broke the invalid $array[key] notation as it'll teach people to RTFM once in a while. If something breaks in your code 99% of the time it is your fault.

    Damien
    Web developer for four+ years

    1. Re:Changes are bad? by eddy+the+lip · · Score: 2, Insightful

      I'd ammend that to most changes have been for good reasons. In my post above, I was thinking specifically of the $HTTP_VARS_ change. Granted, typing $_POST is a heckuva lot nicer, but I really wish more thought had been put into how to handle that. There have also been a number of changes in how individual functions behave between point releases where the only rationale seemed to be that they thought it looked nicer the new way. (It usually did, but don't go doing things like that unless you give people an escape route, at least temporarily).

      Perl is an excellent example of how to handle backwards compatibility the right way. 6 is almost a complete language rewrite, but it's still going to be able to run perl 5 scripts without change, unless you're doing something really funky. And I never had a perl 5 script break because of an upgrade during the entire 5.x series.

      If something breaks in your code 99% of the time it is your fault.
      I'd argue that lacking a formal specification, the language is the final arbiter of what's correct. If it compiles and runs, it's correct. It might be shite code, but if it breaks afterwards because of a change in the language, it's hardly the fault of the coder.

      (Web developer for nearly twice as long, and extreme style nazi).

      --

      This is the voice of World Control. I bring you Peace.

    2. Re:Changes are bad? by Anthony+Boyd · · Score: 1
      the invalid $array[key] notation

      Damien, clue me in? Links? References? Explanations?

    3. Re:Changes are bad? by XO · · Score: 3, Funny

      Er, yeah, how exactly else are you supposed to access a member of an array?

      --
      "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
    4. Re:Changes are bad? by jpkunst · · Score: 2, Insightful

      Maybe he means that it should be $array['key'] (quoted key) instead of $array[key] (unquoted key)?

      JP

    5. Re:Changes are bad? by T-Ranger · · Score: 1
      Incorrect. Or grossly oversimplfied.

      The VM that will run Perl 6 will also be able to run Perl 5. Just as you can use Java to call GTK+, written in C, you can use Perl 6 to call Perl 5 things. You dont say that Java is reverse compatable with C, because it isn't. Perl 6 isn't reverse comptable with Perl 5, because it isn't.

      The Perl 6 interpeter/VM/compiler is a compleate rewite... So much so that it isnt Perl, its Parrot. But Perl 5 isn't a rewite of Perl 5, as in: start with a blank spec. Perl 5 is a starting point, but everything is open to question... The level of tolerance for breakadge is just very high.

    6. Re:Changes are bad? by Electrum · · Score: 1

      Links? References? Explanations?

      Array do's and don'ts

    7. Re:Changes are bad? by DamienMcKenna · · Score: 1

      > > If something breaks in your code 99% of the time it is your fault.
      >
      > I'd argue that lacking a formal specification, the language is
      > the final arbiter of what's correct. If it compiles and runs, it's
      > correct. It might be shite code, but if it breaks afterwards because
      > of a change in the language, it's hardly the fault of the coder.

      When the I and B tags were no longer valid in XHTML, was it the fault of the W3C that web code was invalid?

      > There have also been a number of changes in how individual functions
      > behave between point releases where the only rationale seemed to be
      > that they thought it looked nicer the new way.

      I hadn't come across that myself, so I bow to your experience.

      Damien

    8. Re:Changes are bad? by Anonymous Coward · · Score: 0

      $array["key"]

    9. Re:Changes are bad? by XO · · Score: 1

      presuming you are using numeric keys, as 'normal' rather than making it an associative array?

      --
      "Champagne for my real friends - and real pain for my sham friends!" http://ericblade.postalboard.com/
    10. Re:Changes are bad? by Anonymous Coward · · Score: 0

      > Explanations?

      It was a capricious and malicious change by the "powers in charge" to break many (most of the non-trivial?) PHP scripts. The jerks have fixed it so that an associative array that looks like:

      $a[name]

      Will no longer work! Instead, you have to add extra characters:

      $a["name"]

      It's needlessly wordy.

      Their hatred for their users is apparent every time you read a post on the mailing list from the Zend guys. They hate their users. Every single damn update of PHP has this crap, like changing the tags to start & stop PHP(!!! ?PHP rather than ?), replacing semicolons with colons at the end of if or else statements, adding short-circuiting logic (which is fine since it's more C-like, but the change broke a lot of programs in a way that's hard to track-down), changing the default while-statement so that it usually never ends (the standard ; was changed to a :, so the old programs would loop forever thinking that you had a blank while loop), changing global variables so that they're no longer global, breaking unset() on global variables when in a function, breaking initializes so that they no longer accept valid expressions, made "{$" an invalid sequence in source files (admittedly an obscure error, but we since used {} to enclose negative numbers rather than () with our accounting system we had that sequence in hundreds of places), or not allowing session variable to change in a form. Intentionally breaking if-else statements and turning most while loops into infinite loops is ridiculous. After I've spent the past 16 months converting our company's scripts to PHP4, I'm probably going to waste another year finding all of these new senseless changes. I'm going to have to move to PHP5 to get abstract functions and final functions in classes and to finally get destructors, so I'm dreading the move. I love PHP and use it for everything (yes, even GUI stuff with PHP-GTK), but I hate the idiots in charge.

  4. release canidates not really news by bangular · · Score: 2, Insightful

    RC1 was announced already, announcing RC2 on slashdot is just a bit superfulious. When 5.0 is released it will be news worthy, but rc2 isn't really news, espically since rc1 got it's own slashdot story.

    1. Re:release canidates not really news by z0ink · · Score: 2, Insightful

      It might not make it to the front page, but releases of PHP are generally big news. PHP drives a considerable portion of todays pages. Some developers get all their news from /., so the more exposure the better. ;)

      --
      Steal This Sig
  5. Re:Incorrect Link by mattwarden · · Score: 2, Interesting

    Score:0, Troll

    So much for commentary on how similar PHP5 looks to Java.

  6. RDBMS by /dev/trash · · Score: 1

    Like Postgres.

    1. Re:RDBMS by Anonymous Coward · · Score: 0

      PHP developers use Windows too though, and Postgres isn't nearly as easy to install as MySQL (postgres still requires cygwin, right?).

    2. Re:RDBMS by billcopc · · Score: 1

      Well okay, but the original premise of MySQL was that it would be small and fast.

      Now it's turning into a monstosity, trying to yank away Postgres' share of the free world (so they can sell support contracts).

      Ahh screw you all, I'm going back to DBF format!

      --
      -Billco, Fnarg.com
  7. PHP syntax rant by StandardDeviant · · Score: 3, Insightful

    Eh, first they rip off perl (poorly)
    and now they're goign to rip off Java
    (probably poorly, given their track record).

    Sorry to seem trollish, I've just written
    enough in all three languages (been writing
    web code for pay since '99) to notice that
    three quarters of PHP is a stripped-down,
    amateurishly implemented clone of features
    from other languages (an example that springs
    to mind is: copying visual signification of
    variables like perl, but not disambiguting
    singular and plural types (perl: $scalar and
    @array vs. php: $scalar and $array)). And
    whoever decided that it was ok for some
    array functions to use foo($var,$array)
    and others to use bar($array,$var) should
    just be slapped repeatedly with a dead trout.
    Also, anyone who has tried to use PHP's reference
    mechanism, usually ends up shocked at the number
    of bugs-by-design present in the language.
    I hope the Zend team has picked shallow or deep
    copy for PHP5 rather than just having the
    interpreter do an indeterminate mix of both
    like in PHP4...

    I use PHP because the majority of the code at my
    workplace was written in it (by people who,
    imho, sucked) so the current devs have too much
    legacy code to feasibly port to something
    saner. Irritating sometimes, but it pays the bills.

    *shrug* I guess PHP is what passes for
    language design these days, just like MySQL
    is what seems to pass for relational database
    management these days.

    1. Re:PHP syntax rant by TravisWatkins · · Score: 1

      Seeing how PHP started its life as a Perl script it makes sense that the langauge would be a lot like Perl. However, they are both based on C so the only main thing ripped off is the $. The foo($array, $var) foo($var, $array) thing trips me up about once a day, but thats what the manual is for (best language manual out there, imho). Also, I take insult to your bit of trolling at the end. PHP and MySQL might not be the most powerful languages, but you can get stuff done fast and its perfect for smaller sites. Now, for larger sites I would probably look into mod_python *ducks*.

      --

      "But I'm still right here, giving blood and keeping faith. And I'm still right here."