PHP6 to PHP5.4

January 10, 2012

In early 2012, the official release of PHP5.4 is expected (it’s currently in its fourth release candidate stage). PHP5.4 completes many of the additions that were planned for PHP6 (several others, such as namespaces, were added in PHP5.3). Along with the additions, many of the features that have been deprecated in PHP and were set to be removed in version 6.0 are now being removed in 5.4 instead, such as PHP’s Safe Mode.

The main reason I wanted to use PHP6 when I wrote the third edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” book is the intended support for Unicode. I had not seen this before, but I guess the attempted move to Unicode resulted in PHP scripts requiring twice as much memory as before, with a noticeable lag in performance. This is why the developers had to scrap those plans. But PHP 5.4 has “inline support” for several new languages, including Japanese and some dialects of Chinese. In other words, PHP5.4 has kind of a Unicode-light support. This Unicode support won’t be activated unless specified during the installation process.

I’m not sure where this leaves actual PHP6, but PHP5 is certainly a most excellent tool in its own right. I did use PHP5.3 in the fourth edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” book, and will make use of PHP5.4 in the third edition of my “PHP 5 Advanced: Visual QuickPro Guide”, due out later this year.