Last month PHP 5.4 was released, it has been a while since we had a major release to this language. The changelog look small but get to the point : removal of old bad configs (safe mode's gone, wee!), better performance and more modern ways to code.
The performance part quickly caught my eye at work. There is two problems a website can have : memory usage and speed. And as far as I know, wordpress suffer from both. A vanilla install can be quite slow on a shared host.
What's the point ?
Memory usage is a major factor about how many people can visit your site at the same time. If you add something popular on your forum and you get linked on twitter, blog, etc. More visitors will suddenly show up and your site might slow down or even go off line. Using less memory simply push back this limitation.
A few tests
I quickly measured the memory usage of several sites and here are the result :
-
The Kindred forum, using SMF 1 : 3.5 Mb in PHP 5.3 => 1.6 Mb in PHP 5.4
-
This site, using GetSimple : 844 Kb in PHP 5.2 => 537 Kb in PHP 5.4
-
A clean wordpress install : 16 Mb in PHP 5.3 => 9 Mb in PHP 5.4
So PHP 5.4 uses 30 to 50% less memory, without any modification to the code. There is definitely something better inside.
Using php 5.4
Few hosts allows you to choose your version of PHP and if your site is compatible it's really worth the upgrade.
But your site must be compatible. Usually you should not be using old broken apps, so it should be ready for the upgrade. You better seek what other users said about upgrading to find out if your forum/gallery/whatever will break or not.
Unfortunately many hosts doesn't take good care and still run an obsolete 5.2, possibly with safe mode, magic quotes and all kind of crap web developers hate. This version still runs over 70% of PHP sites, but I am keeping an eye for any evolution.
If you wish to play safe, you can also wait for PHP 5.4.1. Modules and apps will have received the attention they deserve by then.