Things certainly move fast on the web. Just a few weeks ago we described our PHP setup on this blog and we proudly explained that we had both PHP 5.2 and 5.3 installed on our servers. But now that blog post is obsolete because PHP 5.4 was just released!
Fortunately we’ve already installed PHP 5.4 on all of our servers, just days after it was released:
[remi@web300 ~]# php54 -v PHP 5.4.0 (cli) (built: Mar 2 2012 06:58:40)
We’ve also added a new Static/CGI/PHP-5.4 to our control panel for the early adopters.
If you want to switch an existing PHP app to PHP-5.4 you can do so by putting this in a .htaccess file:
<FilesMatch .php$> SetHandler php54-cgi </FilesMatch>
Amongst many other improvements PHP-5.4 is faster and uses less memory and it provides a new feature called Traits which enables developers to reuse code.
More details are available in the ChangeLog.