I think we may have broken a speed record today. At 4.15 PM EST, @dsp_ posted a tweet: “Just pushed the annouincements. PHP 5.4.0 is released. #php” (yes, it included the typo)

PHP 5.4.0 comes with a huge list of new features, improvements, fixes and more. Check out the release announcement and changeLog to see them.

Why 5.4? To start your site or app will run faster than with PHP 5.3, without touching a single line of code!

So, we immediately grabbed the source and built Ubuntu and Centos packages, and placed them in our repository while they were still sizzling. The packages were ready for use at 5.13 PM, less than one hour after being released!

This means that our VPS customers can already start using PHP 5.4.0 in their servers. Here is the simple procedure you need to follow in order to upgrade to PHP 5.4.

For CentOS:

$ yum remove php53

$ yum install php54*

For Ubuntu:

$ apt-get update

$ apt-get remove php53

$ apt-get install php54 php54-mod-php php54-apc

Due to our custom packages, it is possible to have PHP 5.3 and 5.4 installed simultaneously. However, you will not be able to have both versions installed in Apache so you will need to remove php53-mod_php.

Please note, this will only work if you are already using our packages. If your PHP setup was installed from source, it may not work. Feel free to open a support ticket to request assistance.

IMPORTANT: There have been some changes that may affect backwards compatibility, so make sure you read the migration guide and test your site/application with the new version before upgrading your server. Fortunately, downgrading back to PHP 5.3 is easy if needed.

Update 3/1/2010: PHP 5.4 is having some compatibility issues with APC.

What about PHP 5.4 on shared hosting?

We won’t be upgrading our current shared hosting servers that run on PHP 5.2 and PHP 5.3 due to possibilities of old code breaking with PHP 5.4. We will work to have a shared hosting server with PHP 5.4 as soon as possible. In the mean time, please consider getting a VPS with PHP 5.4.