Well, I just got the latest snapshot of PHP 6 running on my dev box.
I had to fix a few minor errors in the source code (oops), but it otherwise compiled without a problem. Because PHP 6 uses the ICU library to handle automatic Unicode encoding, I was able to lop off mbstring and iconv from my configure command.
So far, I’ve noticed two “features” that I don’t particularly like:
- Magic methods have to be public.
- Redeclared class methods have to be compatible with the parent method. This is a REAL cramp for my design style. I hope this restriction was put in place as a temporary measure, or else I’m going to have some serious problems once 6 goes live.
I’m now debating whether I should try to rework my current framework to make it functional in PHP 6 or if I should start from scratch. I’m leaning toward the latter because I want to take advantage of some of PHP 5.3’s more exciting features, such as lambda functions and closures, late static binding and namespaces.
Interestingly, PHP 6 actually has very little over PHP 5.3. Of course, all of the new features for 5.3 were actually originally planned for PHP 6.
But I’d like to see how the native Unicode support holds up in PHP 6. As I’ve mentioned before, Unicode is kind of a big pain in the butt, and if PHP 6 can abstract it all away, I’m ready to jump on the bandwagon.
Posted in: PHP Development
Tags: experiments, PHP 6, rants // Add Comment »