Brandon Savage has posted a guide for installing the latest PHP release - version 5.3 - on an Ubuntu linux installation (since the packages, obviously, won't be available for a while):
With the release of PHP 5.3 to the world, I wanted to be one of the first to try it. The problem is that the typical package managers for Ubuntu won't include PHP 5.3 for some time '" perhaps as long as a year. This is a problem, since I really want to try PHP's latest and greatest features for myself. The problem is, there seems to be a lack of clear, coherent instructions online about compiling PHP on Ubuntu from source.
He assumes you're starting from scratch and walks you through the installation of Apache, PHP 5.3 and how to compile PHP as a shared module to be included in the Apache configuration file (apache2.conf).