Friday Jul 11, 2008

I attended the SF PHP Meetup last night where Andrei Zmievski (PHP 6 release manager and PHP core team member) gave a talk on PHP 6 and internationalization (i18n).  It was good to hear that while PHP 6 has been in development for the past 2 years, it's very likely that we'll be seeing a release in early 2009, and definitely ahead of Perl 6, as Andrei joked.

The main feature of PHP 6 will be that it will be entirely Unicode supported.  Or as one of his slides so aptly stated:

PHP 6 = PHP 5 + Unicode

It was evident that Andrei and team have given quite a bit of thought into what i18n means for the PHP world, and as a result, PHP developers everywhere will soon be enjoying a new set of tools to enable faster development of multi-lingual sites.  My favorite example was a class that had the method names all defined using different languages, including an example in Hebrew (written right to left)!  From a practical standpoint, many of the features are intelligent enough to be able to handle common cultural issues such as proper sorting and date/number formatting.

The even better news is that most of these features will also be available for the upcoming PHP 5.3 release via pecl.  The intl module will be "backwards" compatible with PHP 5.3 since the classes expect UTF-8 encodings.  How you provide those strings is up to the you.

One concern about PHP 6 is that since it will be entirely Unicode, strings will automatically double in size, meaning there will certainly be a performance hit.  So for now, I look forward to i18n with PHP 5.3 as well as the much needed namespaces.

Andrei's presentation is available on his site here.

This blog copyright 2009 by Wen Huang