Slashdot Mirror


An Early Look At What's Coming In PHP V6

IndioMan writes "In this article, learn about the new PHP V6 features in detail. Learn how it is easier to use, more secure, and more suitable for internationalization. New PHP V6 features include improved support for Unicode, clean-up of several functions, improved extensions, engine additions, changes to OO functions, and PHP additions." Update — May 7th at 16:47 GMT by SS: IBM seems to have removed the article linked in the summary. Here's a different yet related article about the future of PHP, but it's a year old.

27 of 307 comments (clear)

  1. So... by msh104 · · Score: 4, Informative

    without wanting to be overly sarcastic..

    What features are they gonne break this time?

    1. Re:So... by 77Punker · · Score: 4, Insightful

      Gotta break some eggs to make an omelet.

      Hopefully this will include cleaning up the argument lists of the string and array functions so that they hall take f($needle, $haystack) in a consistent order. Fixing the argument lists isn't in TFA, but it's a really obvious place to start.

      At work, it may give me an excuse to rewrite a horrible old app that's been holding us back since the days of PHP4. I suspect I am not alone in wanting to see some old (buggy, slow, insecure, poorly designed) PHP apps get ruined so that they can be redeveloped now that PHP5 is actually a decent language.

    2. Re:So... by msh104 · · Score: 4, Informative

      At my work we host and have build and maintain a little over 200 php websites. We host them all ourselves. ( the CMS that we use is build in PHP )

      We earn money from both the hosting and the developing.

      Many of our customers don't want to pay for the porting of their websites to PHP5, let alone PHP6. usually this requires upgrading the CMS as well, making modifications to custom extentions written by outsourcing partys, etc. All in all quite expensive for the site owner.

      "Threatening" them with PHP4 server shutdowns only makes them go away to other hosting providers that will over PHP4 to them.

      So we ended up virtualising all the PHP4 sites together with a good backup system and making our customers understand that we provide no warrenty anymore. We will help them when things blow up on an paid per hour basis.

      Another problem is that we cannot reuse a lot of our code anymore now. Many of our new plugins require php5 so we have to modify them to make them php4 compatible again.

      when php6 comes out we will have to support three different php versions... the horrors of that vision already scare me today..

  2. Time to pay the piper... by Onyma · · Score: 4, Insightful

    I am definitely no PHP expert so perhaps I am wrong but it seems that much of what is being changed is backtracking due to bad language decisions from the beginning. Sadly I think PHP developers with legacy code are going to be paying the price for several versions to come.

    --
    Play me online? Well you know that I'll beat you. If I ever meet you I'll "/sbin/shutdown -h now" you. -Weird Al, kinda.
    1. Re:Time to pay the piper... by FictionPimp · · Score: 5, Funny

      This is why I never write legacy code, only progressive forward thinking code!

      People who write legacy code are just not thinking of the future.

    2. Re:Time to pay the piper... by Anonymous Coward · · Score: 4, Insightful

      You're not far off track. A lot of PHP's problems stems from the fact that the language itself was more or less kind of thrown together rather than planned out (from the early simple Personal Home Page scripting stuff to PHP3 that just kept extending things and adding more functionality bolted on). They only just began to start to stabalize some of that in PHP4 and really only started to fix a lot of issues in PHP5 and now PHP6. They are making good strides but there's a lot of work to do (and a lot of backwards compatible considerations, I'm sure).

      The good news for PHP developers with legacy code is that they've had a long time to fix things. Stuff that is going away has been deprecated for many versions now so none of this should be a surprise. The people that will get hit are the site administrators using PHP based apps that haven't been updated in forever.

    3. Re:Time to pay the piper... by 77Punker · · Score: 4, Funny

      I think PHP developers with legacy code are going to be paying the price for several versions to come.

      I prefer to call it "job security".

  3. question: by larry+bagina · · Score: 5, Insightful

    are these ass clowns still planning on using \ for namespaces?

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

    1. Re:question: by Anonymous Coward · · Score: 4, Informative

      Yes :(

    2. Re:question: by pizza_milkshake · · Score: 4, Funny

      The worst design decision yet, which is saying something.

    3. Re:question: by Just+Some+Guy · · Score: 4, Funny

      Can you blame them for trying to escape?

      --
      Dewey, what part of this looks like authorities should be involved?
    4. Re:question: by SnapperHead · · Score: 4, Interesting

      They are really going to destroy the language with this idea. Its a *VERY* bad design decision, and they really don't care what the community thinks of it. People suggested using ::: ... that claim its too many characters to type. Ok, how about : or . or one of the other suggestions.

      The decision was made in IRC without any community input. People are very unhappy with it, and they don't care. It almost makes me embarrassed to be a PHP developer.

      Maybe with some luck, a competent development team will fork it.

      --
      until (succeed) try { again(); }
  4. A likely story by Anonymous Coward · · Score: 5, Insightful
    As far as I can tell, PHP 6 is probably a long way off. End of 2009 at the very earliest. Consider this: PHP 5.3 introduced RC1 in March with the idea of 1-2 week intervals, and, here in May, we're still not at RC2.

    Given that PHP 6 was "rumored" to be out at least a year ago. I can't decide if the title "An Early Look" is meant to be ironic, or is just a sad indicator of progress.

    Despite that, I would say that three things have recently happened demonstrating the improvement in quality of PHP:
    1. End of Life of PHP 4
    2. Many important improvments in PHP 5.3
    3. Unicode in PHP 6

    I would say that (1) and (2) easily are more important for the language than is (3). PHP 5.3's improvements should be a huge change: Namespaces (I know there's a huge amount of hate for this implementation: get over it. It's going to be very useful), Closures / Lambda Functions, and Late Static Bindings in particular make it hard to wait so long for PHP 5.3.

    So, stop talking about PHP 6! Lets get PHP 5.3 out.

  5. Limited cleanup by Just+Some+Guy · · Score: 4, Insightful

    clean-up of several functions

    Does that include safe_quote_string_this_time_i_really_freaking_mean_it, or do_foo(needle, haystack) and foo_do(haystack, needle)? At least it gets namespaces after all this time, even if they're almost deliberately ugly.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Limited cleanup by Just+Some+Guy · · Score: 4, Funny

      But that might break something that two people found convenient in 1997 and therefore can never be repudiated.

      --
      Dewey, what part of this looks like authorities should be involved?
  6. Namespaces by Phroggy · · Score: 4, Interesting

    So let's say you've got a global variable, $n

    And let's say you're using it in a module, Foo

    And because scattering global variables everywhere is a stupid idea that will lead to much pain, let's say you've decided to use namespaces in PHP6.

    Now, in your main script, let's say you happen to be using a variable $Foo, for no particular reason.

    What does this do?

    <?php
    echo "Hello $Foo\n";
    ?>

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  7. Re:Finally by sopssa · · Score: 4, Interesting

    One thing I hope PHP would have is GUI stuff for both Windows and Linux. Its a great language for everything, and I use it constantly for scripts and other stuff. I've even written ircbots and servers with it, and they all work great and are nice to work with.

    However the GUI design with the existing tools is just pain in the ass, and it doesnt offer a good way to turn your code into machine code.

    I do understand that theres programming languages like c/c++ and delphi and several others, but from all of those php is the nicest to use, even for non-webpages stuff.

    I dont think it would be that hard to implement such, given theres people to do it and understand how PHP can be greatly used for non-webserver stuff aswell. Or is there something against it that I havent thought of?

  8. One of these things is not like the OOthers by Ukab+the+Great · · Score: 5, Insightful

    One of these things just doesn't belong

    python:

    myArray.append(myvalue)

    ruby:

    myArray.push(myvalue)

    objective-c:

    [myArray addObject: myvalue]

    smalltalk:

    myArray add: myvalue

    PHP:

    array_push($myarray, $myvalue)

    1. Re:One of these things is not like the OOthers by ABasketOfPups · · Score: 5, Informative

      Or...

      PHP:
      $myarray[] = $myvalue;

  9. Well wouldn't you know by omuls+are+tasty · · Score: 5, Insightful

    In the finest tradition of PHP, they made Unicode behaviour dependent on a setting. Have these people learnt nothing from the past? magic_quotes anyone? Bleh. All languages have their warts, but the amount of bad design decisions in this one is just staggering.

    1. Re:Well wouldn't you know by VGPowerlord · · Score: 4, Insightful

      Stack Overflow has a question from last year titled Worst PHP practice found in your experience?. Earlier today, I submitted the answer whose summary is "The worst practice in PHP is having the language's behavior change based on a settings file."

      Great minds think alike!

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  10. Re:Finally by rho · · Score: 4, Insightful

    Ubiquity is a pretty compelling feature.

    I mean, BeOS is pretty bitchin', but I'm not spending any of my time on developing applications for it.

    --
    Potato chips are a by-yourself food.
  11. Re:Finally by clone53421 · · Score: 4, Funny

    Too bad Slashdot still wonâ(TM)t.

    I mean, won't.

    --
    Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
  12. Re:Finally by dgatwood · · Score: 4, Interesting

    Because it's syntactically similar to C. It's remarkably close to what C++ should have been---C with classes, integrated hashes, variable-length arrays, and usable string manipulation. Thus, for long-time C programmers, it's a very natural language to pick.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  13. Re:Finally by Yvan256 · · Score: 5, Funny

    That's so cliché.

  14. Its like fast food.. by greywire · · Score: 4, Funny

    PHP: its like fast food..

    You know its bad for you...

    You feel like crap after eating it...

    But damnit, its right there, oh so conveniently located on the way to work, and sometimes a greasy cheeseburger just hits the spot, even though you know you'll pay for it later in heartburn and much later in high cholesterol and love handles, even though right now its really cheap on the wallet.

    Its a guilty pleasure.

    And while you're sucking down that greaseball burger, you see the local soup and salad restaraunt and think "next time, I'll eat right.."

    But come the next day and you see that taco joint and..

    --
    -- Senior Software Engineer, Attorney appearance services, locallawyerapp.com.
  15. Broken Link in Summary by Udigs · · Score: 5, Informative