By Harry Fuecks

PHP6 Planning

By Harry Fuecks

This is all over Planet PHP but in case you missed it,
Derick has published minutes from a core developer meet up in Paris regarding the future of PHP 6.

Jeff has posted some very positive feelings. Likewise think there’s some great stuff coming.

Dont have time for a detailed review right now (Maarten?) so some shorts. The Unicode / i18n support that’s being planned is a big one – if you’re wondering what ICU is, have a look here – it’s not a toy project. Register globals is dead, long live input filters. PHP6 is going to mean more BC breaks but for the right reasons. Namespaces are back in play but with a a lingering ‘?’ hanging around (so don’t raise hopes).

Of course, like everyone who’s not contributing to the core, I’ve got an “opinion” about rejected changes that I need to rant about: delegates – was incited by this comment “We did not see any real-world code example”. Allow me to provide…

Covered delegates a long time ago here (calling them Decorators) with reference to real world projects using them, like this one. The way they have to be implemented with PHP today is probablematic for two reasons – first you have write a significant amount of “dumb” code like this and second, you’re injecting a ton of “worthless” method calls which carry a significant performance overhead. If it was possible to eliminate the latter which could (perhaps) be eliminated in some smart way at engine level. Some smart syntax to specify a delegate / decorator would be cool and yet cooler would be some smart engine-level elimination of the redundant calls.

Rant done – thanks for listening.

  • Anonymous

    Well, here is hoping that they break BC entirely and leave it at that. In my view, the biggest mistake they made with PHP5 was retaining BC with PHP4.yuk

    Big mistake – I think I said as much in the early days before PHP5.0.x became common use? If they – again – make this mistake with BC in regards to PHP5.x or below, well **** them :eek:

    I’ve just not got the time for that – PHP needs a clean break, so lets have it.

  • Yeah, I studied the notes this morning and was about to write a review, but it’ll have wait until the end of my long day of work and floorball…

  • Anonymous

    What’s “BC”? Please.

    Thank you, kindly.

  • Backward Compatibility. Also known as “Beware of Changes”. :)

  • jpatterson

    BC is Backward Compatibility.

  • Canglan

    If PHP6 is going to break the BC, then I hope it is really going to worth it. I personally still develop PHP applications using PHP4, just because they can run on both PHP4 and PHP5.

  • Pingback: Canglan’s Blog 沧蓝品味 » PHP6前瞻()

  • Anonymous

    PHP feels like alpha software to me.

    Valid code written in 4.x isn’t guaranteed to work in new versions of 4.x. Valid code written in 5.x will break in 6.x.

    What does PHP want to be? I’d consider using it again if the developers would stop shooting from the hip. In other words, get together, write a game plan, and go from there.

    It would be wise for PHP to be renamed and a new project started with a game plan made publically available.

  • JosephRagsdale

    I wrote the “PHP feels like alpha software to me.” comment.

  • There is already another BC break in php 5

    They changed the order they handle destructors so all objects are gone by the time you get to sessions or your custom shutdown handler. Meaning it is impossible to call other objects from either.

    This instantly breaks and session library that uses a object based database layer as before it has a chance to write the data the database object is destroyed.

  • Ah! unicode support … why don’t we just migrate to the java camp now, PHP is beginning to resemble java a lot in terms of features.

    But then isn’t it a little too soon to be talking about PHP6, take a look around, look at Asian devs, PHP5 isn’t even mainstream yet and lo! they’re planning on PHP6.

    It was about time they took the register globals out completely, it has brought with it nothing but evil :D

  • Pingback: pilgrim[] » PHP 5.1 est sorti, SAUF QUE…()

  • going to drift further and further into the realm of OOP, it needs to have namespaces. Nothing annoys me more than class and function naming collisions!

    To get around naming collisions, developers of libraries and frameworks tend to name their classes with some sort of a prefix denoting the codebase to which they belong. For instance, the new Zend Framework uses a prefix of “Z” at the beginning of all its class names. It solves the name collision problem to a point, but still leaves you with an overcrowded “default namespace” and offers no organization whatsoever. If PHP 6 is aiming to be a true enterprise-ready object oriented language, they need to add this feature.

  • I somehow clipped the beginning of my last comment.. sorry! Should have read,

    If PHP is going to drift further and further into the realm of OOP, it needs to have namespaces. Nothing annoys me more than class and function naming collisions!

  • redbone

    going to drift further and further into the realm of OOP, it needs to have namespaces. Nothing annoys me more than class and function naming collisions!

    I can’t believe this is still an issue. It’s why I rarely use PHP. I thought it was going to be fixed in PHP5, but the pulled the rug from me again.

  • Pingback: SitePoint Blogs » What won’t be in PHP 6()

  • Chris

    Web needs scripting languages, not oop. oop doesn’t make sense for the web.

  • andi

    I agree with coffee_ninja,namespace is must

  • remco


    That is a little harsh now is it not?
    If you develop a very large web application OOP is the best way to keep things organised and structured.

    I agree that sometimes it’s overkill though, but that is when we talk about those itty bitty projects.

  • Web needs scripting languages, not oop. oop doesn’t make sense for the web.

    @chris No, the web needs people to code in PHP like real programmers, not like designers hacking a few haphazard lines of code into their HTML.

    Even simple web apps, regardless of wether they are coded in a PHP, Java, or .Net, can benefit from better organization and separation of responsibilities.

    My apologies if this reply sounds a bit venemous, but if your way of thinking is what the world truley wants out of PHP, I’ll switch to Java right now and not bat an eyelash. Fortunately I don’t think that it’s so.

  • Anonymous

    Why don’t we all just use perl?

  • Anonymous

    Hey PHP is more BC than anything Microsoft ever wrote. Chris OOP is for Db accessibility I agree you dont need it to validate user input.

  • reazulk

    I personally feel OOP is very important for programming. Some time we feel OOP is time consuming. But for a large project we need to be organized. OOP play good rule to organize our code and to bring reusability and readability finally we can reach a good standard.

    For new version of any language I think the performance is more important then BC. Because every moment we are moving forward so there should not be any scope to switch the language better switch version. Always we have to satisfy our clients and they just want their output. So my programming language needs good performance. And to bring performance better we break BC. Doing some more effort is better then excuse.

  • peanuts

    1. please no more register globals
    2. namespaces … yes please!

    The main focus for php6 should be on OOP i reckon.

Get the latest in Front-end, once a week, for free.