I haven't had much time to follow the discussion around PHP 6 the last few months. Finally I took a half an hour to read up on what will happen with PHP come version 6. It was interesting reading and most of the things I really look forward to.
PHP 6, it seems, will make the leap and become a more clean environment - which is something I really appreciate.
The register_globals, magic_quotes and safe_mode will finally disappear and hopefully slowly fade away into distant memory. It seems PHP 6 will even refuse to start if these settings are found in php.ini. Dropping support for the long versions of super globals, like HTTP_POST_VARS, is also scheduled. This is long overdue.
One thing I at first was a bit hesitant to is moving all the database extensions out of the core into PECL. It looks like this is not set in stone and seems to be an ongoing discussion. After thinking about it myself I think it would be the right thing to do. It would boost the usage of PDO and make it more used and thus more mature. It would also clear up some of the confusion among newcomers in the PHP sphere. "Use PDO or make an active choice" - would probably be the best for the future of PHP.
SOAP is widely used today and good support for SOAP has been around as an extension you have to actively turn on if you needed it. It also has many limitations as has been discussed recently on the PECL-DEV mailing list. There is also a new PHP SOAP extension being developed that is using Apache Axis 2 from the Apache Foundation. I think what is suggested for PHP 6, to fix most of the remaining issues as well as implement support for some of the security extensions of SOAP, is the right way to go. I really think SOAP needs to be natively supported in PHP rather than having to depend on an external library as is the case with the Axis2 extension.
Named parameters to functions and methods has also been discussed. Even though I can remember how I enjoyed writing Smalltalk code with named parameters more than 10 years ago in university I don't think it should be implemented in PHP. Luckily those that decide on the roadmap thought the same as me.
Something that really annoys me today is that you can call methods both statically and dynamically whether they are marked static or not. It just doesn't make sense. This will in the yet distant PHP 6 generate an E_FATAL. Now that makes sense.
This above is all well but it is in the planned additions it gets really interesting. PHP 6 will have the opcode cache APC included in the core distribution. It will not be turned on by default - but I think this is the first small step towards a future with JIT compilation or something along those lines. Good UTF support is another thing that is sorely needed and it seems a lot of work will be directed to clean up the string handling in PHP 6.
With PHP 5 we got lots of object orientation and functionality around XML as well as the database abstraction PDO. It seems that PHP 6 will be more of a cleanup than anything else. I like that even though I am not sure the major version number should be bumped up. I read somewhere, I can't remember where, that PHP 6 will be around in the end of the 2006. December is just 9 months away...
0 comments:
Post a Comment