PHP 5.3 Improvements
September 6th, 2008PHP has a reputation for being a language that allowed sloppy programming, and as a language that didn't contain a lot of "real" programming language features. Hopefully some future releases will finally destroy that notion.
PHP 6 (currently in development, no release date set) should fix a lot of these issues, as it removes register_globals (which allows for very sloppy coding), magic_quotes (auto escaping of POST/GET/etc variables), addition of unicode support, among other things. However this is probably at least a year off before we get a stable release.
Thankfully the PHP devs are giving us a few treats in the next release, PHP 5.3.0. Here's what we get.
- Namespaces
- Lambda functions and Closures
- Better XML support using XMLReader/XMLWrite. Also built-in SOAP support (I believe it's the same before but just compiled in by default).
- Late static binding
- Addition of the intl, phar, fileinfo and sqlite3 extensions
- nowdoc support (basically a heredoc without any parsing), Ternary shortcut and limited goto
- Some Windows support dropped (98, NT4, etc)
- Optional support for MySQLnd
- Optional cyclic garbage collection
- Multiple behind the scenes improvements
There is a good write up on some of the features at sitepoint.com and Gergely Hodicska has a truly excellent four part series/overview on what's new (1, 2, 3, 4). PHP 5.3 is expected to be release mid-October, so get a learning (and putting pressure on those IT departments to get your dev server upgraded right away to start playing asap).