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.
6 Comments
Stefano
March 7, 2012 at 4:49 pm
Are you aware that PHP 5.4 on control panel is listed under “static”, but not under “PHP” or “CGI”? Of course, not a big issue. 😉
Anyway, great job, thank you!
Hosting
March 15, 2012 at 6:37 am
It is really gr8 news that PHP-5.4 is released! I’m going to putting your given code into .htaccess file. thanks for gave us update news.
Cedric Dugas
March 15, 2012 at 4:20 pm
Can we change a php5.3 install to 5.4 from the control panel?
Constantino
March 16, 2012 at 8:25 am
Hi,
With an existing WordPress installation (using PHP 5.2) is it OK to simply paste
SetHandler php54-cgi
into the existing .htaccess file, just before the “# BEGIN WordPress” part?
C
Brett
December 18, 2013 at 10:53 pm
How do we make PHP 5.4 the default binary on the command line?
Remi D
December 19, 2013 at 10:31 am
You can make an alias in your .bashrc file or create a symlink from somewhere in your PATH.