Slashdot Mirror


Changes In Store For PHP V6

An anonymous reader sends in an IBM DeveloperWorks article detailing the changes coming in PHP V6 — from namespaces, to Web 2.0 built-ins, to a few features that are being removed.

9 of 368 comments (clear)

  1. Re:Is this really news? by truthsearch · · Score: 4, Insightful

    Especially since most of the "new" features are either already available or will be included in v5.3. There's literally nothing new here except better Unicode support.

  2. Re:Is this really news? by bcat24 · · Score: 4, Insightful

    There's literally nothing new here except better Unicode support.
    True, but better Unicode support is a very major feature in and of itself. Let's face it, writing a Unicode-enabled Web application with PHP 5 is like hunting wildebeests with a BB gun. It's possible, but it sure ain't easy.
  3. Re:Backwards compatibility is very important by MROD · · Score: 4, Insightful

    Many commercial PHP-based systems are only now just changing over to PHP5 from PHP4. (Yes, I know...)

    That's the way life is, I'm afraid. Most people who are depending upon these sites and software have no control over the vendors and definitely don't have the ability of fixing the code themselves.

    Changing the API so greatly and so often in a non-backwardly compatible fashion does cause genuine problems.. and hosting sites can't afford to support multiple versions. Well, not unless they charge their customers too higher price for hosting their pages.

    --

    Agrajag: "Oh no, not again!"
  4. Re:Too Little Too Late by thetoadwarrior · · Score: 4, Insightful

    Um, no it's not. It's only downfall is that it's too easy to do powerful things so idiots make dangerous code.

    That is not the language's fault. Not everyone wants or needs a JBoss server or something equally silly for their website. PHP is still very good. Safe programming in PHP just needs to be preached more to the new users of PHP and some of the self taught people who perhaps learned off the net from someone else with little experience rather than a book since all books I've seen cover the basics on safety.

    The only thing that annoys me is the fact it's function naming methods aren't consistent. It shows that it's had input from various places without any thought into standardizing things.

  5. Re:Major version? by Splab · · Score: 4, Insightful

    "and a bunch of stuff removed"

    The stuff addressed are some of the widest security holes. On top of that the old way of programming PHP and most guides out there encouraged the usage of these bad functions, getting them totally removed is a huge step forward.

  6. Re:Too Little Too Late by KnightMB · · Score: 5, Insightful

    Unfortunately, everyone has already realized that PHP is an insecure, featureless piece of crap. Real web developers have moved onto other platforms, or stuck with Perl. I think I hear this every time someone has been hurt by a buddy who was able to code circles around them in PHP while they struggled in Perl. Real web developers use every tool at their disposal, not just Perl or PHP only. Your statement alone shows the conceit you have about your own skills as compared to everyone else that makes a living doing web development, apparently much more successfully than you.
  7. Re:Is this really news? by moderatorrater · · Score: 4, Insightful

    and happens to integrate very well with HTML Yes, like regular expressions happen to be good at finding string patterns. PHP is good because it is first, foremost, and almost exclusively a web scripting language, which means you get really like features like super globals, HTML embedding, loose typing, great escaping functions, etc. Most other languages try to be all things to all people, but PHP has a focus and it does it pretty well.
  8. Re:Magic Quotes Removed by TheLink · · Score: 4, Insightful

    But shouldn't you be using mysql_genuine_advantage_escape_string() instead ;).

    It's stupid stuff like that and "Magic Quotes" that make PHP a sad joke.

    Magic Quotes = mixing input layer filtering with output layer filtering = bad. You tend to get data corruption amongst other things.

    Then there's addslashes and friends.

    PHP: "Making The Wrong Ways Easy, and The Right Ways Hard".

    Oh well, I guess php6 is where they are finally trying to do things right now.

    All the pain is because php coders were doing things terribly wrong in the first place. Don't forget the PHP devs were encouraging them to do things wrong for years.

    --
  9. Re:Is this really news? by SanityInAnarchy · · Score: 4, Insightful

    PHP doesn't have any weird syntax like Perl regular expressions---you can do Perl regex, but it is neatly encapsultated into proper strings the way it should be. Regex is never really going to be readable without a separate course learning that. By the time you know regex syntax, a little extra syntax in your language isn't that bad.

    There's no having to manually re-indent dozens of lines of code because you needed to add another nesting level and whitespace is part of the language, etc. And there's no need to do so in any modern programming environment, either. Most text editors these days have ways to re-indent code, uncomment/comment keyboard shortcuts, etc.

    It's just a really clean, lightweight OO language that's exceptionally easy to learn Easy to learn if you already know HTML, I suppose. But where's my actual, interactive PHP shell that I can play with while I'm learning the language?

    OO? Only recently.

    Clean? Not even close, not when you've used a real OO language.

    and happens to integrate very well with HTML. So does everything else, now. I'd argue Ruby is actually better at this than PHP.

    Don't get me wrong, PHP has plenty of weak points when it comes to performance My language of choice right now is Ruby, so I don't really care about that.

    availability of modules to do various obscure things Considering the amount of crap built-in to the language, I doubt that's a huge stumbling block, either. I like CPAN, but it does help when the language itself is clean enough that I'll happily write a library of my own. But most that I'd need to do with a C library has bindings everywhere I really want to do it.

    mainly because it isn't a kitchen sink like Perl I think Perl has too many built-in functions, available everywhere, completely un-namespaced, compared to Ruby.

    But you know what? Perl has a little over two hundred functions in the main namespace. PHP has a little over three thousand, according to this page.

    So, it may not have the kitchen sink in the syntax, but it has the kitchen sink, the bathtub, the plumbing, and the neighbor's shower in the core library.

    Finally, I call BS on this:

    Almost any code written in C (or C++ without templates/exceptions/other icky stuff) can be trivially ported to PHP by replacing the type names with "var" and adding dollar signs in the right places. (I'm exaggerating slightly, but not much.) Is there a language, other than Python, that this isn't true of, for very simple, "Hello World" or "My first HMAC implementation" examples? Sure, the rules would be different, but dropping all the type declarations (swapping for "var") and adding dollar signs is significant.

    Oh, and does PHP support structs? What about function pointers? I doubt it's "almost any code". It's easy when you understand both C and PHP, but again, I assert that's true for many languages, particularly popular web scripting languages.
    --
    Don't thank God, thank a doctor!